var http = require('http')
var fs = require('fs')
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'})
res.end("hello world")
}).listen(3000);
| ubuntu@ip-10-202-152-39:~$ cat /proc/cpuinfo | |
| processor : 0 | |
| vendor_id : GenuineIntel | |
| cpu family : 6 | |
| model : 45 | |
| model name : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz | |
| stepping : 7 | |
| microcode : 0x70a | |
| cpu MHz : 1799.999 | |
| cache size : 20480 KB |
| # Varnish VCL file for Ghost blogging platform. | |
| # http://ghost.org/ | |
| # | |
| # Written for Ghost v0.3.0. | |
| backend default { | |
| .host = "blog-jniedbalski.rhcloud.com"; | |
| .port = "80"; |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
| # Use a stacked column histogram | |
| set style data histograms | |
| set style histogram rowstacked | |
| # Columns are 60% of max width (i.e. not touching, set 1.0 for touching) | |
| set boxwidth 0.6 | |
| # Define colours - 1:yellow 2:orange 3:red | |
| unset style line | |
| set style line 1 linetype 1 linecolor rgb "#ffff99" |
\o/ ... for HAProxy. Recent patches to make TLS faster:
- MINOR: ssl: add DEFAULT_SSL_MAX_RECORD to set the record size at build time
- MINOR: config: make the stream interface idle timer user-configurable
- MEDIUM: stream-int: automatically disable CF_STREAMER flags after idle
- MINOR: channel: add the date of last read in the channel
- OPTIM: ssl: implement dynamic record size adjustment
- MINOR: ssl: handshake optim for long certificate chains.
| PidFile = /var/run/hhvm/pid | |
| Server { | |
| Port = 80 | |
| SourceRoot = /var/www/ | |
| DefaultDocument = index.php | |
| } | |
| Log { | |
| Level = Warning |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
Google Chrome Developers says:
The new WOFF 2.0 Web Font compression format offers a 30% average gain over WOFF 1.0 (up to 50%+ in some cases). WOFF 2.0 is available since Chrome 36 and Opera 23.
Some examples of file size differences: WOFF vs. WOFF2