views:

1006

answers:

3

This is a request for pointers to good documentation/good articles. I'm looking for information on how many connections an Apache server can reasonably handle, and potentially how to load balance between multiple servers. I've done Google searches but it's harder for beginners to judge what are good docs.

+1  A: 

Apache 1.3 had some nasty scalability limitations, but later versions are designed to scale with the hardware and operating system, making them the bottleneck rather than the web server itself. As always, though, it comes down to how you configure and tune it if you want uber performance. Each situation has its own demands, and they're documented here:

http://httpd.apache.org/docs/2.2/misc/perf-tuning.html

The above assumes you're serving static content, which is where Apache excels. If you run webapps behind it, that's your bottleneck, not Apache.

skaffman
+1 - the apache documentation is likely to count as one of the "good docs"!
Dominic Rodger
+1  A: 

Unfortunately you'll be disappointed.

Apache's ability to handle connections (and indeed any other web server's) is limited by what the web application sitting on top of it is doing. If you're serving static pages, you will be able to serve a lot of requests with very little hardware.

Depending on the IO workload (Apache cannot work faster than the IO subsystem - install enough ram to cache your entire content, if you can), you will be able to fill up a gigabit network on any reasonable spec modern box.

Once you've filled a gigabit network, you'll have other things to worry about.

But the reasons that you really need load balancers are because your application slows down Apache and uses up the box's resources. Your application will not be infinitely fast, nor infinitely scalable. You'll need to address those issues.

MarkR
How is it disapointing that Apache can handle virtually unlimited bandwidth? I'd call that exciting.
Karl
It's not unlimited bandwidth, just more than you care about. The web server should not itself create a bottleneck, which doesn't mean there won't be any anywhere else.
MarkR
A: 

As the previous answers have pointed out it is generally not the case that Apache becomes the bottleneck, instead it is usually the application server (PHP, Mongrel, etc). However, if you are only serving static content then you will want to do some benchmarking to see how fast it can go. Of course it is unlikely to peg the exact number which Apache will be able to serve since a lot depends on how you configure it (e.g. disabling persistent connections) and the specs of the server. However to get a ballpark estimate you can use this benchmark as a reference since it is run on 1-8 cores (using one or two servers) so you should be able to find something reasonably comparable to the hardware you are considering.

Of course in order to get the most accurate results you will want to test it yourself using a load generator like ab or httperf.

jkupferman