LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Practical limit to the number of hosts on Apache? (https://www.linuxquestions.org/questions/linux-newbie-8/practical-limit-to-the-number-of-hosts-on-apache-252908/)

JimBass 11-09-2004 02:40 PM

Practical limit to the number of hosts on Apache?
 
Hello all!

One of the clients I do work for hosts about 500 websites across 13 windows servers. He has public IP's for each site. Right now his setup fills an entire rack at a hosting facility. He woiuld like to scale his gear down to a half a rack, so he needs to get down to 6 or fewer machines from 13. I suggested Apache webservers, assuming that they could handle larger loads than IIS on win2000 allows.

I expect that there isn't an absolute limit to the number of hosts on a linux based server, but can anyone suggest a practical limit of how many sites one machine can hold? In the 6 machines, The total load would be like 500 sites, 6 databases, 2 email servers, and 2 DNS servers. I was thinking of putting about 250 sites on each of 2 machines, run 1 database only server, 2 DNS/email servers, and seeing how that behaves.

There would not need to be any virtual hosts, this guys does have 2.5 class C blocks of usable public IP addresses, so that won't need to play a part in your answer. Thanks for your help.

Peace,
JimBass

linux_terror 11-09-2004 04:15 PM

Hell, I'd just virtual host all 500 of em on one box and sync the server to a mirrored server for load balancing and failover. But what your doing sounds sensible as well, more work but sensible. And the idea of using a dedicated DB server and some redundancy in your DNS is a good idead as well. Sounds like your on the right track. I haven't seen an upward limit on what apache can do with Vhosts but I have seen servers that have over 1000 on one, if your going to have 250-500 vhosts on one box consider using a seperate vhosts file just to keep things organized, otherwise your httpd.conf is gonna get REALLY long and confusing.

Good luck,
linux_terror

cyberliche 11-09-2004 04:54 PM

I'll second the above post about having a seperate vhosts file.

Really the number of servers a box can successfully serve is variable. For instance if 499 of the sites only do a couple of thousand hits a month but another does 100,000 a day you might want to set it up having 499 on one box and the other on a box by its self.

I would take a look at the average traffic each of the 500 sites takes in a month, week, day and decide on the server layout in that manner.

Also, it depends on the hardware your running the server on. A dual Opteron or Athalon 64 with 2GB of memory can deal with a hell of a lot more load than a p4 2.5Ghz with 1GB of ram.

As you can see this is a fairly complex question. I would google "apache performance tuning" or something similar and compare your specs and traffic with what others have and go from there.

JimBass 11-09-2004 09:46 PM

Thanks for the input. None of the sites are actually "busy", so I'll probably split them by traffic onto the 2 machines. One of the new machines is being delivered to the client on Monday, and it will be a dual processor of some sort with 2 Gb of RAM, so it is on the higher performance end of things. I'm very glad to know someone has seen over 1000 sites work on a single machine!

Also I many be misunderstanding something - I thought virtual hosts only came into play when you wanted multiple sites to show up under 1 IP address. Each of the sites have their own IP under his current setup, and I thought it would be fine to continue that.

Another reason to keep it is simply that the DNS servers (even though they are windows) are running BIND 9.2, so I can just wholesale import the named.conf and all the files, only change the line in the named.conf that reads "c:/bind/named" to "/var/bind/named/" or whatever the path to the files should be.

I know nothing about the database side of things in either win or linux, so I'm going to leave that to the folks that do that work. All I have to do is configure the systems and get them operational.

Thanks,
JimBass


All times are GMT -5. The time now is 09:42 AM.