Portal Home > Knowledgebase > Articles Database > How can I make two servers share the same IPs?


How can I make two servers share the same IPs?




Posted by Pacesetter007, 05-30-2012, 06:20 AM
Hello, I have a problem and I need a solution from experts here. I have a server with some IPs on it say (10). There is another server with more power i.e ram, processor etc but has only (5) IPs attached to it. The servers are in different locations in the US. The issue is, I want to "join/connect" the two servers together such that both of them share the IPs (10+5) and then make them share their RAM etc. When accounts are created, it can be created on any of them and current IPs in the pool can be assigned. Is this possible? If so, how? Thanks

Posted by TheTop, 05-30-2012, 06:43 AM
The one thing I can think of here is of load balancing. You could have a round robin approach with creating a user on server one, then server 2, then server 1, etc. As far as joining them, I am not sure what level you want to do this at. DO you want to virtualise the two PCs into one machine, make this a cloud system or something similar. In either case I would suggest staying away from trying to make 2 pcs into one especially if they are in different physical locations. If the link goes down for any reason, both your servers are in trouble. Sharing resources would only be recommended if they are in the same cabinet. Please don't take the above as the gospel but rather personal experience. (ie with a pinch of salt )

Posted by gigatux, 05-30-2012, 07:04 AM
This is always going to be a very dodgy thing to do, but the other alternative is to use iptables to forward packets from one IP address to the other using a MASQUERADE-style rule. It's horrible, horrible, and makes your other server act more like a proxy, but it would let your other server use the IPs. I really wouldn't bother though - it's probably more hassle than it's worth!

Posted by madaboutlinux, 05-30-2012, 08:59 AM
The only way to share the resources is by configuring a load balancer but you cannot share the IPs. The IPs are from different locations so they won't work on other server.

Posted by Pacesetter007, 05-31-2012, 08:43 AM
I will really like to see this work.

Posted by NoSupportLinuxHostin, 05-31-2012, 01:56 PM
The simple answer is that you can't do this. For example, you can't have a couple cPanel boxes at different locations seemlessly share resources in this way. You could do provisioning in such a way that the billing software splits the new signups between two geographically diverse servers. But once an account is provisioned on a server, it would not be able to be served from either location on the fly. Each account would only work from only one location. There are a number of different way to build geographically diverse fail over solutions. However, there is not any easy, cheap, or practical way to do it for shared hosting. With enough money, you can build a cloud that can handle geo-failovers of virtual servers and you could put the shared hosting solution into virtual machines in the cloud environment. What is your budget for this?

Posted by hhw, 05-31-2012, 06:03 PM
The only way you can do this without proxying traffic from one site over to the other is if you have BGP Anycasted IP's. You'd need to be running BGP and dedicate a /24 to do that though,which if you had you probably wouldn't need to share 15 IP's in the first place.



Was this answer helpful?

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

Also Read

Language: