Re: haproxy and multi location failover

2011-11-03 Thread joris dedieu
2011/11/1 Senthil Naidu senthil.na...@gmail.com:
 hi,

 we need to have a setup as follows



 site 1 site 2

   LB  (ip 1)   LB (ip 2)
    |   |
    |   |
  srv1  srv2  srv1 srv2

 site 1 is primary and site 2 is backup in case of site 1  LB's failure or
 failure of all the servers in site1 the website should work from backup
 location servers.

Unless you have your own routing, if you want no downtime for nobody
you have to imagine a more complex scenario. Has said below the only
way to switch for a datacenter
to an other is to use dns.

So you have to find a solution for waiting dns propagation to be complete.

I'll do something like :
1) if lb1 fail
- change dns
- srv1-1 become a lb for himself and srv2-1

2) if srv1-1 and srv2-1 fail
- change dns
- ld1 forward requests for lb2 (maybe slow but better than nothing).

and so one ...

Joris

 Regards

 On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you want to
 achieve with multiple sites.

 -Eugene

 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we need
 any external dns services our we can use our own ns1 and ns2 for the same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
  between
  multiple datacenters.
 
  Regards
 
 
 
 






RE: haproxy and multi location failover

2011-11-03 Thread David Prothero
We use www.dnsmadeeasy.com (unsolicited plug) to do automatic DNS failover that 
Joris is describing. It works well for us.

My colleague and I theorized another option would be to run your HAProxy 
instances as Amazon EC2 instances (one each in different availability zones) 
with an elastic IP. That way you'd be taking advantage of Amazon's routing 
network without having to build your own. Like I said, that's only been 
theorized. I haven't actually done that.

---
David Prothero
I.T. Director
Pharmacist's Letter / Prescriber's Letter
Natural Medicines Comprehensive Database
Ident-A-Drug / www.therapeuticresearch.com

(209) 472-2240 x231
(209) 472-2249 (fax)


-Original Message-
From: joris dedieu [mailto:joris.ded...@gmail.com] 
Sent: Thursday, November 03, 2011 1:19 AM
To: haproxy@formilux.org
Subject: Re: haproxy and multi location failover

2011/11/1 Senthil Naidu senthil.na...@gmail.com:
 hi,

 we need to have a setup as follows



 site 1 site 2

   LB  (ip 1)   LB (ip 2)
    |   |
    |   |
  srv1  srv2  srv1 srv2

 site 1 is primary and site 2 is backup in case of site 1  LB's failure 
 or failure of all the servers in site1 the website should work from 
 backup location servers.

Unless you have your own routing, if you want no downtime for nobody you have 
to imagine a more complex scenario. Has said below the only way to switch for a 
datacenter to an other is to use dns.

So you have to find a solution for waiting dns propagation to be complete.

I'll do something like :
1) if lb1 fail
- change dns
- srv1-1 become a lb for himself and srv2-1

2) if srv1-1 and srv2-1 fail
- change dns
- ld1 forward requests for lb2 (maybe slow but better than nothing).

and so one ...

Joris

 Regards

 On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you 
 want to achieve with multiple sites.

 -Eugene

 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we 
 need any external dns services our we can use our own ns1 and ns2 for the 
 same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you 
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers 
 in the conf in a separated backend, using some ACL to take failover 
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu 
 senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover 
  scenario between multiple datacenters.
 
  Regards
 
 
 
 









haproxy and multi location failover

2011-11-01 Thread Senthil Naidu
Hi,

Is it possible to use haproxy in a active/passive failover scenario between
multiple datacenters.

Regards


Re: haproxy and multi location failover

2011-11-01 Thread Baptiste
Hi,

Do you want to failover the Frontend or the Backend?
If this is the frontend, you can do it through DNS or RHI (but you
need your own AS).
If this is the backend, you have nothing to do: adding your servers in
the conf in a separated backend, using some ACL to take failover
decision and you're done.

cheers


On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com wrote:
 Hi,

 Is it possible to use haproxy in a active/passive failover scenario between
 multiple datacenters.

 Regards







Re: haproxy and multi location failover

2011-11-01 Thread Senthil Naidu
Hi,

thanks for the reply,  if the same needs to be done with dns do we need any
external dns services our we can use our own ns1 and ns2 for the same.

Regards


On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
 between
  multiple datacenters.
 
  Regards
 
 
 
 



Re: haproxy and multi location failover

2011-11-01 Thread Gene J
Please provide more detail about what you are hosting and what you want to
achieve with multiple sites.

-Eugene


On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

Hi,

thanks for the reply,  if the same needs to be done with dns do we need any
external dns services our we can use our own ns1 and ns2 for the same.

Regards


On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
 between
  multiple datacenters.
 
  Regards
 
 
 
 



Re: haproxy and multi location failover

2011-11-01 Thread Senthil Naidu
hi,

we need to have a setup as follows



site 1 site 2

  LB  (ip 1)   LB (ip 2)
   |   |
   |   |
 srv1  srv2  srv1 srv2

site 1 is primary and site 2 is backup in case of site 1  LB's failure or
failure of all the servers in site1 the website should work from backup
location servers.

Regards

On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you want to
 achieve with multiple sites.

 -Eugene


 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we need
 any external dns services our we can use our own ns1 and ns2 for the same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
 between
  multiple datacenters.
 
  Regards
 
 
 
 





Re: haproxy and multi location failover

2011-11-01 Thread Baptiste
There is not (yet) a GSLB or dyndns daemon available in opensource,
but a few DNS server could be used to emulate this feature.
- PowerDNS  + pipe backend
- unbound + python module

or yourself updating your DNS server to trigger a failover


Cheers


On Tue, Nov 1, 2011 at 6:10 PM, Senthil Naidu senthil.na...@gmail.com wrote:
 hi,

 we need to have a setup as follows



 site 1 site 2

   LB  (ip 1)   LB (ip 2)
    |   |
    |   |
  srv1  srv2  srv1 srv2

 site 1 is primary and site 2 is backup in case of site 1  LB's failure or
 failure of all the servers in site1 the website should work from backup
 location servers.

 Regards

 On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you want to
 achieve with multiple sites.

 -Eugene

 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we need
 any external dns services our we can use our own ns1 and ns2 for the same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
  between
  multiple datacenters.
 
  Regards
 
 
 
 






Re: haproxy and multi location failover

2011-11-01 Thread vivek . malik
DNS propagation can take a long time based on my experience. We have a similar 
problem where we host multiple identical setups in different EC2 availability 
zones. We have been thinking of having DNS entry with multiple A records for 
load distribution and failover. However, that doesn't solve the problem of OP.

Vivek
Sent via BlackBerry from T-Mobile

-Original Message-
From: Baptiste bed...@gmail.com
Date: Tue, 1 Nov 2011 18:17:25 
To: Senthil Naidusenthil.na...@gmail.com
Cc: Gene Jgh5...@gmail.com; haproxy@formilux.orghaproxy@formilux.org
Subject: Re: haproxy and multi location failover

There is not (yet) a GSLB or dyndns daemon available in opensource,
but a few DNS server could be used to emulate this feature.
- PowerDNS  + pipe backend
- unbound + python module

or yourself updating your DNS server to trigger a failover


Cheers


On Tue, Nov 1, 2011 at 6:10 PM, Senthil Naidu senthil.na...@gmail.com wrote:
 hi,

 we need to have a setup as follows



 site 1 site 2

   LB  (ip 1)   LB (ip 2)
    |   |
    |   |
  srv1  srv2  srv1 srv2

 site 1 is primary and site 2 is backup in case of site 1  LB's failure or
 failure of all the servers in site1 the website should work from backup
 location servers.

 Regards

 On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you want to
 achieve with multiple sites.

 -Eugene

 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we need
 any external dns services our we can use our own ns1 and ns2 for the same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
  between
  multiple datacenters.
 
  Regards
 
 
 
 






Re: haproxy and multi location failover

2011-11-01 Thread Baptiste
True :)
Despite short TTLs, some client would take a long time to failover.
But it's the only option unless you own your AS and you are able to
route your traffic inside it.

rgs


On Tue, Nov 1, 2011 at 6:30 PM,  vivek.ma...@gmail.com wrote:
 DNS propagation can take a long time based on my experience. We have a 
 similar problem where we host multiple identical setups in different EC2 
 availability zones. We have been thinking of having DNS entry with multiple A 
 records for load distribution and failover. However, that doesn't solve the 
 problem of OP.

 Vivek
 Sent via BlackBerry from T-Mobile

 -Original Message-
 From: Baptiste bed...@gmail.com
 Date: Tue, 1 Nov 2011 18:17:25
 To: Senthil Naidusenthil.na...@gmail.com
 Cc: Gene Jgh5...@gmail.com; haproxy@formilux.orghaproxy@formilux.org
 Subject: Re: haproxy and multi location failover

 There is not (yet) a GSLB or dyndns daemon available in opensource,
 but a few DNS server could be used to emulate this feature.
 - PowerDNS  + pipe backend
 - unbound + python module

 or yourself updating your DNS server to trigger a failover


 Cheers


 On Tue, Nov 1, 2011 at 6:10 PM, Senthil Naidu senthil.na...@gmail.com wrote:
 hi,

 we need to have a setup as follows



 site 1 site 2

   LB  (ip 1)   LB (ip 2)
    |   |
    |   |
  srv1  srv2  srv1 srv2

 site 1 is primary and site 2 is backup in case of site 1  LB's failure or
 failure of all the servers in site1 the website should work from backup
 location servers.

 Regards

 On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:

 Please provide more detail about what you are hosting and what you want to
 achieve with multiple sites.

 -Eugene

 On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com wrote:

 Hi,

 thanks for the reply,  if the same needs to be done with dns do we need
 any external dns services our we can use our own ns1 and ns2 for the same.

 Regards


 On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:

 Hi,

 Do you want to failover the Frontend or the Backend?
 If this is the frontend, you can do it through DNS or RHI (but you
 need your own AS).
 If this is the backend, you have nothing to do: adding your servers in
 the conf in a separated backend, using some ACL to take failover
 decision and you're done.

 cheers


 On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  Hi,
 
  Is it possible to use haproxy in a active/passive failover scenario
  between
  multiple datacenters.
 
  Regards
 
 
 
 








Re: haproxy and multi location failover

2011-11-01 Thread Vivek Malik
May I ask what some of the acronyms in this email thread stand for

RHI -
AS -
GSLB -

Thanks,
Vivek

On Tue, Nov 1, 2011 at 2:26 PM, Baptiste bed...@gmail.com wrote:

 True :)
 Despite short TTLs, some client would take a long time to failover.
 But it's the only option unless you own your AS and you are able to
 route your traffic inside it.

 rgs


 On Tue, Nov 1, 2011 at 6:30 PM,  vivek.ma...@gmail.com wrote:
  DNS propagation can take a long time based on my experience. We have a
 similar problem where we host multiple identical setups in different EC2
 availability zones. We have been thinking of having DNS entry with multiple
 A records for load distribution and failover. However, that doesn't solve
 the problem of OP.
 
  Vivek
  Sent via BlackBerry from T-Mobile
 
  -Original Message-
  From: Baptiste bed...@gmail.com
  Date: Tue, 1 Nov 2011 18:17:25
  To: Senthil Naidusenthil.na...@gmail.com
  Cc: Gene Jgh5...@gmail.com; haproxy@formilux.orghaproxy@formilux.org
  Subject: Re: haproxy and multi location failover
 
  There is not (yet) a GSLB or dyndns daemon available in opensource,
  but a few DNS server could be used to emulate this feature.
  - PowerDNS  + pipe backend
  - unbound + python module
 
  or yourself updating your DNS server to trigger a failover
 
 
  Cheers
 
 
  On Tue, Nov 1, 2011 at 6:10 PM, Senthil Naidu senthil.na...@gmail.com
 wrote:
  hi,
 
  we need to have a setup as follows
 
 
 
  site 1 site 2
 
LB  (ip 1)   LB (ip 2)
 |   |
 |   |
   srv1  srv2  srv1 srv2
 
  site 1 is primary and site 2 is backup in case of site 1  LB's failure
 or
  failure of all the servers in site1 the website should work from backup
  location servers.
 
  Regards
 
  On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:
 
  Please provide more detail about what you are hosting and what you
 want to
  achieve with multiple sites.
 
  -Eugene
 
  On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com
 wrote:
 
  Hi,
 
  thanks for the reply,  if the same needs to be done with dns do we need
  any external dns services our we can use our own ns1 and ns2 for the
 same.
 
  Regards
 
 
  On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:
 
  Hi,
 
  Do you want to failover the Frontend or the Backend?
  If this is the frontend, you can do it through DNS or RHI (but you
  need your own AS).
  If this is the backend, you have nothing to do: adding your servers in
  the conf in a separated backend, using some ACL to take failover
  decision and you're done.
 
  cheers
 
 
  On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu 
 senthil.na...@gmail.com
  wrote:
   Hi,
  
   Is it possible to use haproxy in a active/passive failover scenario
   between
   multiple datacenters.
  
   Regards
  
  
  
  
 
 
 
 
 



Re: haproxy and multi location failover

2011-11-01 Thread Baptiste
RHI: Route Health Injection
AS: Autonomous System
= RHI relies on your AS to route traffic to the right POP (Point Of Presence)
Pro: compatible with anybody speaking BGP or OSPF, failover quickly
Cons: require an AS, so not compatible with public clouds :)

GSLB: (geo|global) Server Load Balancing
= relies on DNS, depending on the status of the POP (cf above).
Pro: easy to configure
Cons: no standard, must rely on the same LB vendor for each POP, quite
expensive, can take some time to failover

cheers

On Tue, Nov 1, 2011 at 7:29 PM, Vivek Malik vivek.ma...@gmail.com wrote:
 May I ask what some of the acronyms in this email thread stand for
 RHI -
 AS -
 GSLB -
 Thanks,
 Vivek

 On Tue, Nov 1, 2011 at 2:26 PM, Baptiste bed...@gmail.com wrote:

 True :)
 Despite short TTLs, some client would take a long time to failover.
 But it's the only option unless you own your AS and you are able to
 route your traffic inside it.

 rgs


 On Tue, Nov 1, 2011 at 6:30 PM,  vivek.ma...@gmail.com wrote:
  DNS propagation can take a long time based on my experience. We have a
  similar problem where we host multiple identical setups in different EC2
  availability zones. We have been thinking of having DNS entry with multiple
  A records for load distribution and failover. However, that doesn't solve
  the problem of OP.
 
  Vivek
  Sent via BlackBerry from T-Mobile
 
  -Original Message-
  From: Baptiste bed...@gmail.com
  Date: Tue, 1 Nov 2011 18:17:25
  To: Senthil Naidusenthil.na...@gmail.com
  Cc: Gene Jgh5...@gmail.com; haproxy@formilux.orghaproxy@formilux.org
  Subject: Re: haproxy and multi location failover
 
  There is not (yet) a GSLB or dyndns daemon available in opensource,
  but a few DNS server could be used to emulate this feature.
  - PowerDNS  + pipe backend
  - unbound + python module
 
  or yourself updating your DNS server to trigger a failover
 
 
  Cheers
 
 
  On Tue, Nov 1, 2011 at 6:10 PM, Senthil Naidu senthil.na...@gmail.com
  wrote:
  hi,
 
  we need to have a setup as follows
 
 
 
  site 1 site 2
 
    LB  (ip 1)   LB (ip 2)
     |   |
     |   |
   srv1  srv2  srv1 srv2
 
  site 1 is primary and site 2 is backup in case of site 1  LB's failure
  or
  failure of all the servers in site1 the website should work from backup
  location servers.
 
  Regards
 
  On Tue, Nov 1, 2011 at 10:31 PM, Gene J gh5...@gmail.com wrote:
 
  Please provide more detail about what you are hosting and what you
  want to
  achieve with multiple sites.
 
  -Eugene
 
  On Nov 1, 2011, at 9:58, Senthil Naidu senthil.na...@gmail.com
  wrote:
 
  Hi,
 
  thanks for the reply,  if the same needs to be done with dns do we
  need
  any external dns services our we can use our own ns1 and ns2 for the
  same.
 
  Regards
 
 
  On Tue, Nov 1, 2011 at 9:06 PM, Baptiste bed...@gmail.com wrote:
 
  Hi,
 
  Do you want to failover the Frontend or the Backend?
  If this is the frontend, you can do it through DNS or RHI (but you
  need your own AS).
  If this is the backend, you have nothing to do: adding your servers
  in
  the conf in a separated backend, using some ACL to take failover
  decision and you're done.
 
  cheers
 
 
  On Tue, Nov 1, 2011 at 2:25 PM, Senthil Naidu
  senthil.na...@gmail.com
  wrote:
   Hi,
  
   Is it possible to use haproxy in a active/passive failover scenario
   between
   multiple datacenters.
  
   Regards