Re: make haproxy notice that backend server ip has changed

2013-12-05 Thread Pawel Veselov
On Wed, Dec 4, 2013 at 11:45 PM, joris dedieu wrote: > 2013/12/2 Pawel Veselov : > > Maybe an external library like ldns > , may provide a complete > protocole handeling (resolv.conf parsing, dns query, packet parsing, > DNSSEC validation ...) > Looks promi

Re: make haproxy notice that backend server ip has changed

2013-12-04 Thread joris dedieu
2013/12/2 Pawel Veselov : > Here is my first attempt at this: > > http://pastebin.com/xXfZJf3f > > The diff is over http://git.1wt.eu/git/haproxy-1.4.git/ ref > eb9632f7c6ae675bdee4c82eb0d298ba7f37fc52 > > To enable DNS checks on a server, the host name defined configuration should > be suffixed wi

Re: make haproxy notice that backend server ip has changed

2013-12-02 Thread Pawel Veselov
Here is my first attempt at this: http://pastebin.com/xXfZJf3f The diff is over http://git.1wt.eu/git/haproxy-1.4.git/ref eb9632f7c6ae675bdee4c82eb0d298ba7f37fc52 To enable DNS checks on a server, the host name defined configuration should be suffixed with "@ar", and checks must be enabled for t

Re: make haproxy notice that backend server ip has changed

2013-11-23 Thread Pawel Veselov
Hi Willy, On Sat, Nov 23, 2013 at 1:38 AM, Willy Tarreau wrote: > Hi Pawel, > On Fri, Nov 22, 2013 at 07:54:18PM -0800, Pawel Veselov wrote: > > Hi. > > > > There has been a heated discussion on this about 2 years back, so sorry > for > > reopening any wounds. Also sorry for long winded intro. >

Re: make haproxy notice that backend server ip has changed

2013-11-23 Thread Steven Le Roux
Going further on this, it would be amazing to have the hability to plug haproxy with zookeeper for service discovering and health checks. Since zk use an application aware heartbeat, it maintains a connection to perform health checks. If a service is noticed as down, the ephemeral "znode" will be

Re: make haproxy notice that backend server ip has changed

2013-11-23 Thread Eugene Istomin
Willy, such a great idea! We can help in testing. -- */Best regards,/* /Eugene Istomin/ > Hi Pawel, > > On Fri, Nov 22, 2013 at 07:54:18PM -0800, Pawel Veselov wrote: > > Hi. > > > > There has been a heated discussion on this about 2 years back, so sorry > > for > > reopening any wounds. Al

Re: make haproxy notice that backend server ip has changed

2013-11-23 Thread Willy Tarreau
Hi Pawel, On Fri, Nov 22, 2013 at 07:54:18PM -0800, Pawel Veselov wrote: > Hi. > > There has been a heated discussion on this about 2 years back, so sorry for > reopening any wounds. Also sorry for long winded intro. > > My understanding is that neither 1.4 nor 1.5 are planned to have any > supp

Re: make haproxy notice that backend server ip has changed

2013-11-22 Thread Eugene Istomin
Pavel, we have the same resolving issues, it would be really nice to have such kind of feature. -- */Best regards,/* /Eugene Istomin/ Hi. There has been a heated discussion on this about 2 years back, so sorry for reopening any wounds. Also sorry for long winded intro. My understanding is

Re: make haproxy notice that backend server ip has changed

2013-11-22 Thread Pawel Veselov
Hi. There has been a heated discussion on this about 2 years back, so sorry for reopening any wounds. Also sorry for long winded intro. My understanding is that neither 1.4 nor 1.5 are planned to have any support for resolving any server addresses during normal operations; i.e. such are always re

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Willy Tarreau
On Sat, Aug 06, 2011 at 02:42:45AM +0300, Piavlo wrote: > Well certainly aws has it's limitations which force you to design a > very different infrastructure than you would in normal datacenter > environment. > IMHO this is the great thing about those limitations as you are forced > to start th

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Piavlo
Well certainly aws has it's limitations which force you to design a very different infrastructure than you would in normal datacenter environment. IMHO this is the great thing about those limitations as you are forced to start thinking differently and end up using a set of well known and estab

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Baptiste
On Fri, Aug 5, 2011 at 11:58 PM, Willy Tarreau wrote: > Hi Baptiste, > > On Fri, Aug 05, 2011 at 11:53:40PM +0200, Baptiste wrote: >> Or using some kind of haproxy conf template with some keyword you >> replace using sed with IPs you would get from the hosts file? >> with inotify, you can get upda

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Willy Tarreau
Hi Baptiste, On Fri, Aug 05, 2011 at 11:53:40PM +0200, Baptiste wrote: > Or using some kind of haproxy conf template with some keyword you > replace using sed with IPs you would get from the hosts file? > with inotify, you can get updated each time hosts file change, then > you generate a new hapr

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Willy Tarreau
Hi Julien, On Fri, Aug 05, 2011 at 05:07:36PM -0400, Julien Vehent wrote: > Willy: EC2 gives a different kind of flexibility but requires to think > differently. So, yeah, they do crazy stuffs like randomizing the LAN IPs > allocations. But people have been complaining about that so much that >

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Baptiste
> Why don't you edit the haproxy conf directly and reload it ? If you have the > new IP and are going to update the /etc/hosts, what is stopping you from > doing a sed on the backend's ip in haproxy.cfg ? > > > Or, you could just run in a VPC and stop doing weird stuff with your > networking ;) > >

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Julien Vehent
On Fri, 5 Aug 2011 22:42:08 +0200, Willy Tarreau wrote: On Fri, Aug 05, 2011 at 11:11:50PM +0300, Piavlo wrote: >It's not a matter of config option. You're supposed to run haproxy >inside a chroot. It will then not have access to the resolver. There are simple ways to make the resolver work ins

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Hank A. Paulson
I think the problem here is that the EC2 way of doing automatic server replacement is directly opposite normal and sane patterns of doing server changes in other environments. So someone on EC2 only is thinking this is a process to hook into and use and others, like Willie, are thinking wtf? why

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Willy Tarreau
On Fri, Aug 05, 2011 at 11:11:50PM +0300, Piavlo wrote: > >It's not a matter of config option. You're supposed to run haproxy > >inside a chroot. It will then not have access to the resolver. > There are simple ways to make the resolver work inside chroot without > making the chroot less secure.

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Piavlo
On 08/05/2011 06:53 PM, Willy Tarreau wrote: On Fri, Aug 05, 2011 at 11:17:16AM +0300, Piavlo wrote: But why do a reload of haproxy in other situations (much more common in my use case and loose statistics and possibly some connections) if there could be a config option that tells haproxy to re

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Willy Tarreau
On Fri, Aug 05, 2011 at 11:17:16AM +0300, Piavlo wrote: > But why do a reload of haproxy in other situations (much more common in > my use case and loose statistics and possibly some connections) if there > could be a config option that tells haproxy to re-resolve name to ip - > then backend he

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Julien Vehent
On Fri, 05 Aug 2011 11:17:16 +0300, Piavlo wrote: On 08/05/2011 06:51 AM, Julien Vehent wrote: On Fri, 05 Aug 2011 01:08:22 +0300, Piavlo wrote: Hi Jens, I'm using names which resolve to internal EC2 addresses in haproxy configs - the /etc/hosts of all instances are auto updated then new inst

Re: make haproxy notice that backend server ip has changed

2011-08-05 Thread Piavlo
On 08/05/2011 06:51 AM, Julien Vehent wrote: On Fri, 05 Aug 2011 01:08:22 +0300, Piavlo wrote: Hi Jens, I'm using names which resolve to internal EC2 addresses in haproxy configs - the /etc/hosts of all instances are auto updated then new instance is added/removed. But the problem manifests th

Re: make haproxy notice that backend server ip has changed

2011-08-04 Thread Willy Tarreau
On Fri, Aug 05, 2011 at 01:08:22AM +0300, Piavlo wrote: > > Hi Jens, > > I'm using names which resolve to internal EC2 addresses in haproxy > configs - the /etc/hosts of all instances are auto updated then new > instance is added/removed. > But the problem manifests then the instance is stoped

Re: make haproxy notice that backend server ip has changed

2011-08-04 Thread Julien Vehent
On Fri, 05 Aug 2011 01:08:22 +0300, Piavlo wrote: Hi Jens, I'm using names which resolve to internal EC2 addresses in haproxy configs - the /etc/hosts of all instances are auto updated then new instance is added/removed. But the problem manifests then the instance is stoped and then started - t

Re: make haproxy notice that backend server ip has changed

2011-08-04 Thread Piavlo
Hi Jens, I'm using names which resolve to internal EC2 addresses in haproxy configs - the /etc/hosts of all instances are auto updated then new instance is added/removed. But the problem manifests then the instance is stoped and then started - this makes the internal ip to change. I can also

Re: make haproxy notice that backend server ip has changed

2011-08-04 Thread Jens Bräuer
Hi Alex, I know my answer is not strictly related to HA-Proxy, but its use in EC2, so I hope its ok to post it. Would a possible solution to your problem be to use internal EC2 addresses? Since now, the only situation where the behavior you describe would occur is the following: - start new EC

make haproxy notice that backend server ip has changed

2011-08-04 Thread Piavlo
Hi, I'm running haproxy in ec2 environment - and there is one problem I noticed. The backend servers are configured as names and not ip - if backend server IP changes and even if the /etc/hosts on haproxy server is updated - haproxy does not catch this change. It has to be restarted to catch