D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] CENTOS webservers Load Balance

 

My experience isn't that broad, I've done optimising a few sites/servers heavily. Rather than lots broadly.

Really though - how many sites a server can hold is a naive question.

You can do mass virtual hosting in Apache and serve practically unlimited numbers of sites. Since the overhead per site is trivial, and can be made as low as one row in a table.

Similarly anything static/cacheable can be pushed out to a CDN provider or front end cache (facebook even do this with your private photos, all you need is the URL to see other people's photos).

But the limits depend mainly on what you do to service requests.

My bottleneck with Apache has nearly always been RAM, but that is because I'm typically using pre-fork MPM, and each request is handled by a different process. But then pre-fork is a poor model for scalability, but simpler to deploy and understand/debug. It's also the defat in Debian ;)

Event based models are more sensible from a scaling perspective, and typically degrade nicer under load (they go slower instead of running out of RAM and/or eventually hanging as Apache pre-fork seems to do under duress). That can be done with other Apache MPMs or Nginx or other technologies (tomcat).

Similarly I've seen a lot of sites stuffed on database performance. Although almost invariably this is because they have no DBA skills rather than too much traffic.

Although sometimes applications set out to make this hard on admins (Drupal offers the option (via modules of course) to store access logs and other voluminous dross nicely indexed in a relational database, this is a great way to guarantee you'll bottleneck on the database or I/O. Especially if the database is on the same host as the website. Just when you need performance most the database is busy updating the index with the vital news that the end user is still running Chrome for the 10th time during this page load (when your Analytics provider already recorded it, probably once, when loading the HTML).

What are you doing on the hosts? Where is your bottleneck coming from. This will probably tell you how to split the work.
-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq