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 ?

link|improve this question
1  
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
3  
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
2  
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
feedback

migrated from stackoverflow.com Apr 8 '11 at 14:49

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

3 Answers

up vote 2 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.

link|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
1  
I've never seen apache giving such numbers in a standalone server. Good luck. – poisonbit Apr 8 '11 at 16:01
feedback

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.

link|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
feedback
  • 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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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