Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

Hosting related query

Can a sub folder be kept on a different servers (to load balance)?



7:26 am on Sep 6, 2006 (gmt 0)

10+ Year Member

Hello everyone,

I want to is it possible to have subfolder or subfolders on a different servers so as to load balance.

Or is just the only the whole site could be load balanced between multiple servers?

I know that sub-domains could be on differnt servers but what about only a particular sub-folder.

for e.g. www.domainxyz.com on one server & but www.domainxyz.com/abcd/ on differnt server.

I dont have much knownledge about load-balancing n all so any inputs from u guys are much needed.



1:36 pm on Sep 6, 2006 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

You can put a subfolder on a different server and use a reverse proxy for that subfolder. This will decrease the load of the CPU and disk from the main server, but bandwidth will be just as high, because all requests for the proxied directory are still passing the main server. So this is only a solution if your problem is CPU and disk related, not if it is bandwidth related.

For Apache this type of proxying is called a reverse proxy. I don't know if it is possible on IIS.

Example in Apache:
If you have a site example.com and a busy forum at example.com/forum/ you may want to put the forum software on a separate server. I will call this second server forumexample.com

The reverse proxy must be set-up to redirect all requests for the subdirectory forum to the external server. You add the following lines to the VirtualDirectory entry of example.com:

ProxyPass /forum/ [forumexample.com...]
ProxyPassReverse /forum/ [forumexample.com...]

The last stage is that you make sure that forumexample.com is not accesible from the internet, but only directly from your example.com server. You could do this to connect the forumexample.com server directly with example.com server via a cross-over cable and a dedicated network card (recommended, highest performance), or use firewall settings or Apache Allow,Deny settings to allow only HTTP requests from example.com (easier, and also works if you do not have access to the server). You need to do this to prevent duplicate content problems in search engines (especially Google)

Before activating proxying, read the Apache manual carefully. Don't accidentely create an open proxy which can be abused by spammers, it might put the IP of your server example.com in a number of blacklists.


5:07 am on Sep 7, 2006 (gmt 0)

10+ Year Member

Thanks lammert very much for the info.

This will help.... I am bit worried about it's effect at rankings on google as the site is a high ranking site & gets 80-90% of traffic from google only.

So I dont want to take any kind of risk on rankings.

So do u think we should only consider getting whole site load balanced on multiple server & not just any subfolder.



12:31 pm on Sep 7, 2006 (gmt 0)

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Proxying of one subfolder is for a search engine the same as load balancing. If you setup everything the right way, they will only see the main host they connect to. The subfolder-proxying or site-load balancing (which is a form of proxying anyway) is completely transparent performed in the background.

Often splitting one subfolder to another server is easier, if that subfolder contains a specific part of the site like a forum. When using a load balancer for the full site, you must assure that every visitor stays connected with one and the same server during his session in case you use a shopping cart or something similar. With load balancing you'll also have a problem with synchronizing data between the two servers if the content is dynamic.

Full load balancing has however the advantage that all data is stored on two servers. If one fails, the other will take over all requests automatically and the site remains in the air.


4:19 am on Sep 8, 2006 (gmt 0)

10+ Year Member

Thanks again lammert... this will help. :-)

Featured Threads

Hot Threads This Week

Hot Threads This Month