Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a static site and an 8GB RAM Server. The site would have just some javascript and static content. I need to handle about 20,000 concurrent visitors. Will my 8GB Server able to handle this ? Can anybody explain how to configure Apache MaxClients and other settings for this ?

share|improve this question

migrated from Apr 8 '11 at 14:49

This question came from our site for professional and enthusiast programmers.

Will you really have 20,000 requests at the same time? – SLaks Apr 8 '11 at 14:50
Yes, The site will have a burst traffic and could reach around 50000 users. That is what i meant using 20,000 simultaneous connections – Sam Alex Apr 8 '11 at 14:56
How fast can your car go? – GregD Apr 8 '11 at 15:02
Hmm, Around 130 kmph. :) – Sam Alex Apr 8 '11 at 15:09
Greg's comment was sarcastic, implying that Apache's ability to handle "connections" means nothing without context. For instance, how fast can your car go while towing a 10,000# trailer might be completely different than how fast it can go while it's stuck in sand, etc. 20k visitors means nothing as well; each visitor will likely initiate multiple connections, and they wont be concurrent; additionally the rate of those connections would be dependent on your site design/purpose. There's far too many variables for us to give you any sort of intelligent answer. – Chris S Apr 13 '11 at 13:49
up vote 5 down vote accepted

If you have money for enough bandwidth, just put nginx for serve static (js are static files).

It can serve high numbers on 2G RAM + sata disk desktops, so it should fly with server hardware.

Of course, do not use php + apache2 with mpm prefork, just to serve static content... or RAM will be a problem (and I/O, and context switching, and time waits, and... etc etc)

Oh, and add cache headers for everything you can, being a static content server. If things are cached, I doubt you get 20.000 NEW requests each second... or in one day all the planet and part of the universe have seen your site.

share|improve this answer
Well, i use nginx for all my other works. but for this one i am forced to use Apache. – Sam Alex Apr 8 '11 at 15:57
I've never seen apache giving such numbers in a standalone server. Good luck. – poisonbit Apr 8 '11 at 16:01

If you are worried about a single server not being able to cope with too many connections you should consider using a web cache like Varnish. This will take the load off when serving images and static content.

The only way to really ever test how many users etc you could have on a single server depends entirely on what you are running on it. For example I could have a PHP script that chews up a lot of the CPU or memory, then serves a page. It may perform well with up to a few hunders page serves per minute. But if you have a well written optimized site, then you might find that you could server thousands of (average) pages per minute. Varnish will definitely take some of the basic load requests off the web server. nginx is another good web server, it doesnt have as many bells and whistles as apache, but the general consensus is that it is very fast, well optimized at what it does do and uses less resources.

share|improve this answer

RAM isn't going to be your problem if all the files are just 'as-is' and static. Your bandwidth is what will really matter. 20,000 concurrent will need a hefty connection to send out those files.

share|improve this answer
Yes, i know, but it will be hosted on Amazon EC2. Will there be a problem there ? – Sam Alex Apr 8 '11 at 14:55
You still have to send the html/js files? Assuming you host your js libraries offsite(ie: use Google for core JQuery), I would say you're still limited more by bandwidth/network than the server hardware. – JClaspill Apr 8 '11 at 15:25
Yes, JS files are hosted within the server. – Sam Alex Apr 8 '11 at 16:06
  • Use the apache2 mpm worker engine.
  • Disable any unneeded module.
  • Check for other bottlenecks (firewalls, kernel network settings)

Make sure you have enough bandwidth, and test, test, test your setup before you make it available to the masses.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.