FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Server Development

 
 
LinkBack Thread Tools
 
Old 09-06-2012, 01:03 PM
Jesus arteche
 
Default Load balancing between datacenters

Hey guys,
I am trying to create a ha infrastructure. I would like to have my infrastructure in a cloud/vps provider in europe and a replica in USA. I will create load balancers in a HA mode. My problem comes up when I think how to share the floating ip. I mean in a datacenter with the same range of IP is not a problem...but when the datacenters are in different ranges of ip's ...it shouldn't work...

Any ideas about how to do it?
I'm using HAproxy and keepalive...
Thanks in advance
--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 09-06-2012, 03:08 PM
Clint Byrum
 
Default Load balancing between datacenters

Excerpts from Jesus arteche's message of 2012-09-06 06:03:11 -0700:
> Hey guys,
>
> I am trying to create a ha infrastructure. I would like to have my
> infrastructure in a cloud/vps provider in europe and a replica in USA. I
> will create load balancers in a HA mode. My problem comes up when I think
> how to share the floating ip. I mean in a datacenter with the same range of
> IP is not a problem...but when the datacenters are in different ranges of
> ip's ...it shouldn't work...
>
> Any ideas about how to do it?

There are a few approaches to this. They all boil down to some abuse
of DNS.

DNS based load balancing works by using low TTL's and an actively
maintained list of the known working IP's. So basically each DC gets
one floating IP and is monitored for availability. DNS clients are fed
only those IPs that are available. Some nice commercial load balancers
will also look at server load on all DC's and shift traffic to other
DCs when one is overloaded by leaving the overloaded DC out of some DNS
responses. Also there are some of these that will use GeoIP or AnyCast
to send users to a closer DC.

This has a HUGE latency drawback because of the low TTLs. If the TTLs
are raised, then the system becomes much less responsive to a down DC.

The *simplest* thing to do is to feed back all of those DC IPs and
hope that clients are smart enough to fail-over quickly, which most web
browsers are. Of course, this will not give you good balancing between
the DCs because of caching and clients just doing the wrong thing.

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 09-06-2012, 03:53 PM
"Tyler J. Wagner"
 
Default Load balancing between datacenters

On 2012-09-06 14:03, Jesus arteche wrote:
> Hey guys,
>
> I am trying to create a ha infrastructure. I would like to have my
> infrastructure in a cloud/vps provider in europe and a replica in USA. I
> will create load balancers in a HA mode. My problem comes up when I think
> how to share the floating ip. I mean in a datacenter with the same range of
> IP is not a problem...but when the datacenters are in different ranges of
> ip's ...it shouldn't work...
>
> Any ideas about how to do it?
>
> I'm using HAproxy and keepalive...

You cannot do it with one floating IP. Options:

1. Get your own /24, and BGP-announce the subnet from both locations. This
is what Google uses to make their DNS IPs 8.8.8.8 and 8.8.4.4 work globally
(taking you to the nearest server according to network path).

2. Build a load balancer in one of those locations, or a third one, which
proxies, possibly via a VPN, to both servers. This moves the failure point
forward.

3. Use DNS load balancing with a low TTL, along with a detection system to
remove the DNS entry of a failed server.

Regards,
Tyler

--
"All that is necessary for the triumph of evil is that good men do
nothing."
-- Attributed to Edmund Burke

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 07:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org