Live data from Hacker News

500,000 Requests/Sec – Modern HTTP Servers Are Fast

lowlatencyweb.wordpress.com

11–20 of 41 posts

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#11
nginx saturates at ~18k req/sec / core with a latency of ~24ms. This saturation is not coming from nginx in particular but from OS limits (mode switching, stack copying etc.. for read/write system calls).

There is nothing new in "modern HTTP servers". They are event-driven programs and this has existed for a long time.

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#12

Quickly looking over SoftLayer's price sheet, it looks to be a little over $1k a month for Intel 5670 with 24GB of RAM

Softlayer is a lot more expensive than most hosts these days. They're closer to being in Rackspace territory now.

You can get a dual E5-2609 with 32gb of ram + bandwidth from a good host like WebNX for $369 / month.

And if you wanted to spend $1k per month, you can get a dual e5-2687W (16 cores @ 3.1ghz) with 128gb ram; with a 4x SAS RAID 10, plus a 120gb ssd drive, plus a 2tb backup freebie, plus 100mbps unmetered bandwidth (30tb). That literally blows the doors off Softlayer.

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#14
My toy web server can achieve similar performance using a much more modest hardware (Core i7 2640 laptop), using way less RAM (a few dozen kilobytes).

Granted this is also being tested on localhost with static content (no disk I/O) -- but shows that event-driven servers are not that novel or difficult to write: my code weighs around 1700 LOC of (might I say) readable C.

Static file serving is also fast (using sendfile(), etc), but needs an overhaul to achieve usable concurrency. Currently there's a ~4x performance drop while serving files, but I'm working on this.

(The sources are at http://github.com/lpereira/lwan by the way.)

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#15
post #12

Quickly looking over SoftLayer's price sheet, it looks to be a little over $1k a month for Intel 5670 with 24GB of RAM

Softlayer is a lot more expensive than most hosts these days. They're closer to being in Rackspace territory now. You can get a dual E5-2609 with 32gb of ram + bandwidth from a good host like WebNX for $369 / month. And if you wanted to spend $1k per month, you can get a dual e5-2687W (16 cores @ 3.1ghz) with 128gb ram; with a 4x SAS RAID 10, plus a 120gb ssd drive, plus a 2tb backup freebie, plus 100mbps unmetered b…

Literally? Did you literally fall asleep in English class?

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#16
post #12

Earlier quoted context omitted.

Softlayer is a lot more expensive than most hosts these days. They're closer to being in Rackspace territory now. You can get a dual E5-2609 with 32gb of ram + bandwidth from a good host like WebNX for $369 / month. And if you wanted to spend $1k per month, you can get a dual e5-2687W (16 cores @ 3.1ghz) with 128gb ram; with a 4x SAS RAID 10, plus a 120gb ssd drive, plus a 2tb backup freebie, plus 100mbps unmetered b…

Literally? Did you literally fall asleep in English class?

Douche much?

Looking over your comments on HN, that latest comment seems to be the peak of your contribution here. In over two years you've picked up 394 karma points. I'm going with the assumption that all of those karma points are from being a pedant about the English language. You're such a valuable member of this community! Rock on.

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#17
post #5

Sigh, another completely synthetic benchmark with big iron: A dual Intel Xeon X5670 with 24GB of RAM from SoftLayer. The X5670 has 6 cores @ 2.93 GHz, 2 threads per core, /proc/cpuinfo shows 24 CPUs. Serving a plain HTML page over localhost via nginx. A medium length blog post with pretty much no real-world information.

Still, for comparison a huge site like reddit is serving around 1000 pageviews per second. The hardware in this post isn't that good, nowadays you can do quite a bit better. If you could get even 0.02% of these pageviews per second out of more modern hardware that's already 100 pageviews per second. Only a handful of sites need more than that. For example HN certainly does not. And AFAIK HN runs single core on a language (Arc) that compiles to Scheme, not the fastest in town. Since reddit is only about 70x larger than HN, we are probably close to the point where with a lot of optimization a site like reddit could be run on a single large box (if we're not there already).

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#18
post #16

Earlier quoted context omitted.

Literally? Did you literally fall asleep in English class?

Douche much? Looking over your comments on HN, that latest comment seems to be the peak of your contribution here. In over two years you've picked up 394 karma points. I'm going with the assumption that all of those karma points are from being a pedant about the English language. You're such a valuable member of this community! Rock on.

Figuratively speaking, of course.

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#19
post #11

nginx saturates at ~18k req/sec / core with a latency of ~24ms. This saturation is not coming from nginx in particular but from OS limits (mode switching, stack copying etc.. for read/write system calls). There is nothing new in "modern HTTP servers". They are event-driven programs and this has existed for a long time.

As you rightly said - the key limit if you get to such high I/O levels is first with OS processing - the implementation of the network stack on the iron - with performance above 50k the limit comes from the "pipes" moving the data up from the network card to the OS layer where the web server sits (and providing the layer 4 / TCP services).

Hence in telcom environments where you get such requirements the TCP/IP stack is processed closer to the card - but no out-of-the-box web servers could handle such streams - most of that is handled with e.g. C-libs closely bound to the networking HW.

With such specialized NW cards (16 core card) plus libs you get to > 1'500'000 teardowns p.s. / connections established and roughly 15Gbps - there are now 100Gbps solutions on the market on the top-end - your actual throughput depends mostly what kind of processing you're doing. That kind of equipment is of course not normally used for web serving - more for (transparent) proxying and inspection / traffic shaping, etc as more-and-more telcom cores are completely TCP/IP based.

Re: 500,000 Requests/Sec – Modern HTTP Servers Are Fast

#20
post #16

Earlier quoted context omitted.

Literally? Did you literally fall asleep in English class?

Douche much? Looking over your comments on HN, that latest comment seems to be the peak of your contribution here. In over two years you've picked up 394 karma points. I'm going with the assumption that all of those karma points are from being a pedant about the English language. You're such a valuable member of this community! Rock on.

Which of your 98 days here qualifies you to assess the peak of someone's contribution over a span of two years?
Post reply on HN