LWN: Comments on "Inside NGINX: How We Designed for Performance & Scale" https://lwn.net/Articles/647788/ This is a special feed containing comments posted to the individual LWN article titled "Inside NGINX: How We Designed for Performance & Scale". en-us Wed, 17 Sep 2025 05:23:40 +0000 Wed, 17 Sep 2025 05:23:40 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Similar to VoltDB https://lwn.net/Articles/648150/ https://lwn.net/Articles/648150/ JB318 There was a <a rel="nofollow" href="http://voltdb.com/products/featuresbenefits/reasons-behind-voltdb-architecture">recent article</a> about VoltDB, an in-memory relational database that does very similar things. In particular, the ideas of one process/thread per CPU (not one per user), and of rearchitecting things to avoid waiting on network I/O (either the transmission itself or user "think time"). Mon, 15 Jun 2015 13:33:27 +0000 Celebrate success https://lwn.net/Articles/648138/ https://lwn.net/Articles/648138/ bronson <div class="FormattedComment"> For example, Github Pages: <a href="http://githubengineering.com/rearchitecting-github-pages/">http://githubengineering.com/rearchitecting-github-pages/</a><br> <p> "the entire service ran on a single pair of machines"<br> </div> Mon, 15 Jun 2015 06:25:16 +0000 Celebrate success https://lwn.net/Articles/648094/ https://lwn.net/Articles/648094/ Sesse <div class="FormattedComment"> If you're hosting hundreds of thousands of sites for various customers, and they all get to modify aspects of their own configuration (like making new sites)?<br> </div> Sat, 13 Jun 2015 20:30:53 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/648064/ https://lwn.net/Articles/648064/ wahern <p> <a href="http://www.kegel.com/c10k.html">The C10K problem</a> was written nearly 15 years ago. </p> <p> Nothing NGINX does is interesting for people who actually implement these services. We're all using the same patterns, subject to various constraints. The NGINX article touts using features like Linux's SO_REUSEPORT* to address thundering herds with accept(2). But that was added only a couple of years ago, and it was a Google team who added it. And that team wasn't using NGINX, but nonetheless probably using custom software employing the very same patterns. My point being, NGINX isn't leading the pack here--they're following, just like everybody else. These patterns have grown organically from the experience of countless engineers. </p> <p> The article is just a piece of marketing. </p> <p> The problem with these patterns is that they're really hard to use. You're stuck using either callbacks or explicit state machines to resume operations between events, or some mixture of the two. Most implementations choose callbacks. In this context callbacks operate as non-local jumps, which means such code is very difficult to reason about and breed bugs. It's why implementations like Go, Warp, and my own Lua <a href="http://25thandclement.com/~william/projects/cqueues.html">cqueues</a> module try to hide this complexity using threads or coroutines. Actually making these patterns easy to build complex, ad hoc applications upon without losing performance is the hard part. NGINX is less than stellar in that regard. </p> <p> * I say "Linux's" because the semantics are incompatible with the historic BSD option of the same name. </p> Fri, 12 Jun 2015 22:19:55 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/648056/ https://lwn.net/Articles/648056/ sodabrew <div class="FormattedComment"> <font class="QuotedText">&gt; Surely everyone has been to a bank or post office?</font><br> <p> I think everyone identifies the wrong problems at those places, presented here in sweeping generalizations and personal anecdotes:<br> <p> Most people have been to establishments where you wait in one line and get dedicated service when it's your turn. Slow service is considered a problem of not enough clerks.<br> <p> Personal anecdote: I was waiting in line at my local post office to pick up a package. I had a "sorry we missed you" pickup slip. So did half the people in line. One clerk came out and said, "If you have a pickup slip give it to me!" She took 10 slips, went in back, and came back five minutes later with 10 boxes. We all left the post office, satisfied at this quick service. Meanwhile, someone in the middle of the line (who had benefited now that fewer people were ahead of him!) complained that some people with pickup slips had been behind him in line, and he wanted to buy his stamps RIGHT NOW.<br> <p> Most people complain when they visit an establishment that hands you off between specialists - think hardware store (Clerk says "Go to plumbing in aisle 11 and wait for a plumbing specialist to help you"). Slow service is considered a problem of not having the first clerk cross-trained in plumbing.<br> <p> Personal anecdote: I went to my local hardware store and asked for a piece of pipe to be cut and threaded. The first clerk I spoke with said sure, he could do that. We went to plumbing, and he struggled for 20 minutes to cut and thread the pipe. He did it incorrectly twice, which would have been a safety hazard for my home. Eventually I demanded that he find someone better trained on the equipment to help me.<br> </div> Fri, 12 Jun 2015 18:46:09 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/648049/ https://lwn.net/Articles/648049/ MoSal <div class="FormattedComment"> <p> H2O is also interesting:<br> <p> <a rel="nofollow" href="https://h2o.examp1e.net/">https://h2o.examp1e.net/</a><br> <a rel="nofollow" href="http://blog.kazuhooku.com/2014/11/the-internals-h2o-or-how-to-write-fast.html">http://blog.kazuhooku.com/2014/11/the-internals-h2o-or-ho...</a><br> </div> Fri, 12 Jun 2015 16:54:23 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/648007/ https://lwn.net/Articles/648007/ ncm <div class="FormattedComment"> Maybe I am too experienced but I find it hard to understand how anyone would have any difficulty with this architecture. Surely everyone has been to a bank or post office?<br> </div> Fri, 12 Jun 2015 12:17:17 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/647985/ https://lwn.net/Articles/647985/ ibukanov <div class="FormattedComment"> Thanks for the link, it was very interesting read indeed.<br> <p> I am not sure that it is immutable data that helps Warp most. Warp greatly benefited from high performance green threads and the garbage collection in GHC. It allows to use straightforward procedural code style and freely use suitable data structures without the need to worry for memory management.<br> <p> Also, although the scalability of Warp compared with Nginx regarding throughput was impressive, it would be interesting to get comparison of Warp versus nginx regarding max response time, CPU utilization and memory usage as green thread abstractions and garabage collection typically harm those.<br> </div> Fri, 12 Jun 2015 07:08:58 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/647984/ https://lwn.net/Articles/647984/ kleptog <div class="FormattedComment"> Splitting everything into jobs the way they do and running everything in a few worker threads is a powerful mechanism and exists elsewhere, such as in Python Twisted (though it works with Deferreds (promises) the effect is the same).<br> <p> What I do find is that it's a mode of programming that many people find very difficult to wrap their heads around. Maybe it's just unfamiliarity and it just needs to be taught in schools more. But some projects where I think it would be a perfect fit I end up not doing it because I fear the people who have to maintain it after me would get completely lost.<br> </div> Fri, 12 Jun 2015 06:19:32 +0000 Celebrate success https://lwn.net/Articles/647975/ https://lwn.net/Articles/647975/ flussence <div class="FormattedComment"> I can't think of a good example, but it seems like the sort of usage pattern an automated test suite would generate.<br> </div> Thu, 11 Jun 2015 23:12:49 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/647973/ https://lwn.net/Articles/647973/ einstein <div class="FormattedComment"> Very interesting... I might want to dust off that old Haskell book and take another look<br> </div> Thu, 11 Jun 2015 22:47:25 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/647936/ https://lwn.net/Articles/647936/ oever <div class="FormattedComment"> And reading how Warp, a web server written in Haskell, manages to compete with NGINX is an insightful follow-up.<br> <a href="http://www.aosabook.org/en/posa/warp.html">http://www.aosabook.org/en/posa/warp.html</a><br> <p> The diagrams explaining the different threading strategies are very insightful.<br> I find it wonderful to see how having a very safe language with immutable data structures can lead to an elegant but fast design.<br> </div> Thu, 11 Jun 2015 16:30:38 +0000 Celebrate success https://lwn.net/Articles/647847/ https://lwn.net/Articles/647847/ ncm <div class="FormattedComment"> They probably deserve even their own congratulations. It is an impressive achievement.<br> <p> I wonder, though, why a site would load a new configuration many times per second.<br> </div> Thu, 11 Jun 2015 03:46:42 +0000 Inside NGINX: How We Designed for Performance & Scale https://lwn.net/Articles/647795/ https://lwn.net/Articles/647795/ miah <div class="FormattedComment"> I'd also recommend reading their chapter from Architecture of Open Source Applications; <a rel="nofollow" href="http://www.aosabook.org/en/nginx.html">http://www.aosabook.org/en/nginx.html</a><br> </div> Wed, 10 Jun 2015 19:43:18 +0000