Portal Home > Knowledgebase > Articles Database > Split website across multiple srevers


Split website across multiple srevers




Posted by sh4ka, 11-25-2010, 11:07 AM
Hi, I hope some of you can guide me on this. Let's suppose I have www.site.com in one CentOS + Apache server, this website has a few directories, including: www.site.com/games/ www.site.com/images/ www.site.com/rss/ How can I split the content of this three directories for example, in four servers, so: When you browse site.com, it requests data from server apache1 When you browse site.com/games/, it requsts data from another phisical different server, let's call it apache2 When you browse site.com/images/, it requsts data from another phisical different server, let's call it apache3 When you browse site.com/rss/, it requsts data from another phisical different server, let's call it apache4 How can this be done using 4 different servers? Thanks!

Posted by Erawan Arif Nugroho, 11-25-2010, 11:48 AM
Well, I ever do that, but using the Cpanel and Sub Domain. Let say, www.site.com --> 111.112.111.111 images.site.com --> 111.113.111.111 rss.site.com --> 111.114.111.111 We can do that by changing the A Record in Cpanel. As for Pure CentOs + Apache, I didn't do that yet

Posted by sh4ka, 11-25-2010, 11:56 AM
Yeah.. i know it can be done using subdomains, but that's not the way I wanted.. I need this to be working, due to SEO stuff: www.site.com --> 111.112.111.111 www.site.com/images --> 111.113.111.111 www.site.com/rss --> 111.114.111.111 www.site.com/games --> 111.115.111.111 Any ideas? Thanks!

Posted by drspliff, 11-25-2010, 11:58 AM
That is not possible because the common thing here is www.site.com. Also, multiple IPs is mostly an SEO myth, and it's irresponsible for an ISP to provide you with multiple IP addresses for this reason and against ARIN, RIPE etc. policy.

Posted by sh4ka, 11-25-2010, 12:05 PM
So, it can't be done.. , I thought it would be possible using some kind of balancer/proxy or dns redirect... Any other ideas? Thanks.

Posted by drspliff, 11-25-2010, 12:23 PM
Well, yeah you can do it with a reverse proxy or load balancer, but all requests regardless of which path they use will be sitting the same load balancer(s).

Posted by viGeek, 11-25-2010, 10:54 PM
On one server there are a variety of ways to do this. You could setup multiple Apache instances and then have your primary configuration proxy to those. You could also have your primary configuration simply be a proxy that will proxy internally to multiple vhosts. You could setup nGinx for example on the server and have that operate as the proxy as well to apache. You could also setup one configuration in Apache and use mod_rewrite with some RegEX to handle it as well.

Posted by sh4ka, 11-26-2010, 03:07 AM
Thanks vigor! The problem is that this website recieves more than 1.000.000 visitors per day and one server can not handle all the load. It must be split between multiple servers. Any other ideas? Thanks.

Posted by Netsazan, 11-26-2010, 03:53 AM
You can do such thing via SRV records for domains. Just look for an appropriate domain registrar which supports that. It also helps load-balancing of the pages.

Posted by drspliff, 11-26-2010, 06:44 AM
So use DNS round robin to split the load over multiple servers (or multiple load balancers)

Posted by watchsay, 11-26-2010, 09:02 AM
What type of content is being hosted in those directories, is it possible to replicate your nodes and just use some sort of load balance or roundrobin over multiple boxes?

Posted by viGeek, 11-26-2010, 01:45 PM
Multiple servers, even better. Once again there are a variety of ways to do it. Assuming you don't have a network device to handle the load balancing. I would probably setup a proxy server then utilize mod_proxy_balancer to equally distribute the load amongst several servers. In addition there's also HAProxy (http://haproxy.1wt.eu/) which will serve this purpose nicely as well. I manage the infrastructure for an Alexa top 5000 site, we utilize foundry for our load balancing, but had a major foundry issue at one point and temporarily cut over to mod_proxy_balancer and it was able to handle and distribute our load quite nicely, so feel confident it would be able to handle that amount of traffic if setup correctly and enough hardware to handle.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Recommendation (Views: 716)


Language: