500,000 Requests/Sec – Modern HTTP Servers Are Fast
lowlatencyweb.wordpress.com
lowlatencyweb.wordpress.com
Serving a plain HTML page over localhost via nginx. A medium length blog post with pretty much no real-world information.
Serving over multiple 10GE to front end cache servers physically colocated with it would be realistic -- not sure how much of a hit that would be vs. over localhost.
Static vs. dynamic content is a reasonable optimization to make for an application under heavy load.
I don't know if reddit could run on a single server, but this benchmark does nothing to prove it. A pageview on reddit consist of several http requests. A http requests translates into several requests into a database backend. In this syntactic benchmark he is requesting the same static file over and over again, so nginx and/or linux can cache it in memory (or CPU cache).
Also even if they could put reddit on a single server, it would require a lot of optimization and engineering time is more expensive than hardware. It would also make adding new futures in the future a pain in ass, because you would have to be very greedy with CPU time (and other resources like memory, bandwidth, etc...). Also you want a multi-server setup for redundancy and handling extra capacity.
EDIT: I don't if you also planning to put the database on the same server? Web servers are basically stateless so they are easy to scale. It would be interesting to calculate how much disks that server would need just to handle the IO throughput.
Full disclosure: This is some speaking who used to work for social network with 9M users and 3,000 servers.
Even though a pageview on reddit translates to several HTTP requests, only one of those requests has to serve dynamic HTML. The requests that get the JS, CSS and images can go to a content delivery network (and they probably already do). You'd probably indeed want to put the database on the same server, with the vast majority of DB accesses hitting main memory (as you can easily get a server with hundreds of gigabytes or even terabytes of RAM nowadays -- it helps that reddit's access pattern is very heavily concentrated on new posts). Of course you have to replicate to multiple servers to prevent data loss.
9M users and 3,000 servers sounds like a lot. What kind of servers are these? What is the size of the database, roughly?
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.)
There is nothing new in "modern HTTP servers". They are event-driven programs and this has existed for a long time.
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.
Generally Linux / Unix (carrier grade / HA) is used within such environments as the OS. Context switches (user land / kernel) are some of the most expensive operations so they are to be avoided as often as possible.
What you're pointing to are features you generally find in RTOS (real-time OS) solutions - and these kind of cards / platforms allow using them. Look up the Trillium platform from CCPU for example how such a stack / system is layered - they use Wind River PNE-LE (Linux edition for network equipment) for the HA & non-HA protocols.
http://ontwik.com/python/django-deployment-workshop-by-jacob...
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.
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.
http://ark.intel.com/compare/47920,37147
The Softlayer server is a Xeon, the Hetzner is a desktop grade processor.
Key differences for me
* Cache
* QPI (especially in a 2P config that makes a difference)
* Max TDP ... that's a HUGE one.
* ECC memory. See http://perspectives.mvdirona.com/2012/02/26/ObservationsOnEr... for why this is important
So, you're not comparing apples to apples