Serve millions of concurrent connections and static files?
I am just curious about the server configurations to serve just static files from one server.
Is it possible to build a server that just for static files and serve millions of concurrent connections. What could be the best HTTPD service for this?
The server will only serve static files from directories and will not use any other service beside a HTTPD and ofcourse no PHP.
Solution 1:
Millions of concurrent connections? Unless you are hosting video streams or other large files, http requests usually finish in such short time that even with busier sites you don't get that many concurrent connections. If you do, you seriously don't have only one server. Also with that kind of traffic your network traffic would be on such high level that I don't think one server would be your best bet.
But, let's imagine you truly run a service with only one server and millions of concurrent connections: nginx or lighttpd would then be your best bet. Next you probably would need to adjust many kernel parameters such as fs.open
. Also you probably would need to compile your own kernel.
Here are slides about how HEANET scaled their Apache 2.x to 20 0000+ concurrent sessions. Note that even that required quite a lot of tinkering.
Solution 2:
I expect you're being a tad optimistic with your traffic estimates, but your best bet for large-scale static asset service will be nginx. Note that with that many concurrent connections you'll have to tweak some kernel parameters.