0

I am having one primary temp domain

www.product.com

For each client i need to have separate sub domain mapped to same server with same port(80) through virtual host.

www.client1.product.com
www.client2.product.com
www.clientn.product.com

what's my problem is my server reaches maximum load, so i am unable to add additional clients.

my current setup

www.product.com is mapped with server 1 using only 1 ip address

server 1 using

www.client1.product.com
www.client2.product.com
.
.
.
www.client20.product.com

Here is my actual problem

now server1 reaches maximum utilization of physical resources

so i am buying another additional server from my datacenter

so in server2 i need to continue sub domain from

www.client21.product.com
.
.
.
www.clientn.product.com 

1) Is it possible?

2) Is there any solution for my problem , if yes please clarify me.

Note:

I am new to web hosting and newbie in managing dedicated servers.

Update:

More information about my application architecture

www.client1.product.com uses separate unique rails instance with separate mysql db 
www.client2.product.com uses separate unique rails instance with separate mysql db 

for more clarity of my question visit

https://stackoverflow.com/questions/12210495/phusion-passenger-nginx-virtual-host-sub-domain-configuration-for-ruby-on-rail

3 Answers 3

0

As I understood the question you want to host multiple subdomains on a www.product.com that too on multiple physical boxes. Your first server goes out of resources by adding clinet1-20..

You should configure the second box exactly the same that is your first box is, i.e. OS, web server,database server etc..

Then in web server configuration just add the virtual hosts same as you do with your first box.

After that all you have to do is you have to make changes in DNS of www.product.com

You have to add A record for the added subdomains for example if you added client22.product.com on the second server, you put in the code, you added the database, then add an A record as client22 and put in the IP address of the second server. wait for few minutes before DNS propages. Verify this by doing a ping test on client22.product.com to see if it resolves to the IP you added with the A record.

I hope it helps.

0

I can think of three approaches to your problem:

  • Use DNS to resolve client1-20 to your first server and 21-n to your second or use round-robin, i.e. let both servers serve out the same content but let DNS spread the load (a bit clumsy, IMHO, but probably the easiest to implement)
  • Use Apache's proxy functionality to balance the load (mod_proxy_balancer) (probably the more elegant solution but takes a bit more skill to get right)
  • Buy hardware to do the load balancing (costs extra, of course)
1
  • i think i didn't explain my question in correct sense, so you miss understood my question sorry for the cause, i updated my question for more clarity
    – Sam
    Sep 14, 2012 at 16:39
0

at your server that resolves your domain, why dont you create the A register and make it point to your others servers? I did something like that, creating an A register to point to other server and all the traffic was redirect automaticly to it,should work for you too.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .