4 ms·
Nginx is incredible. It's my second favorite piece of software (haproxy wins by a hair). At justin.tv we serve tens of billions of requests per month using ng
by kvogt 17y ago
Nginx is incredible. It's my second favorite piece of software (haproxy wins by a hair). At justin.tv we serve tens of billions of requests per month using nginx, and it uses so few system resources that we can run our CPU-heavy caching engine on the same servers.
Take a look at the source sometime. It's kind of fun to see an HTTP parser written like, "if (ngx_str3_cmp(m, 'G', 'E', 'T', ' ')) { r->method = NGX_HTTP_GET;"
- jwecker 17y agoI've absolutely loved patching and working on modules for nginx source code. Partially I suspect because it's so homogeneous. It's nice and modular and succinct - the optimizations don't obfuscate the code. As others have pointed out, responding to http requests is not rocket science, and digging into nginx reminds you that responding to a simple problem simply tends to yield pretty good reliability and performance.
- whyleyc 17y agoGood to hear you would recommend Nginx. Would you mind expanding on how you use Nginx and haproxy together ? Do you front haproxy with Nginx or vice-versa ?
- kvogt 17y agonginx front end -> haproxy -> caching engine -> haproxy -> app instances (multiply this stack N times) haproxy's HTTP feature set is comparatively limited and we simply have too much traffic to put one machine in front of a bunch of web servers.