Re: HAProxy in High Availability

2012-06-29 Thread David Coulson


On 6/28/12 7:15 PM, Willy Tarreau wrote:

That's already what keepalived does, and it goes a bit further
in that you can monitor the service for real, not just the
process presence, and even decide several failover scenarios
using floating VRRP priorities. For instance, I usually assign
a weight of 4 to my haproxy process and 2 to sshd. That way, if
haproxy dies, the other one takes the VIP. However, if both
haproxy work and one sshd dies, the one taking the VIP is the
one still reachable for administration. If one of each dies,
the one with the running haproxy wins.
You can do similar functionality with Pacemaker - Not sure if it is more 
complex, the same, or simpler to support than keepalived. It's just 
'different'. I've used keepalived twice in the last 10 years, and 
pacemaker pretty much every day - Probably a little biased.


Pacemaker is tech preview in RHEL6, and SuSE 11 uses it as it's standard 
resource manager for clustering. Would be nice if there was 
documentation or at least config snippets from users who have 
implemented it in the field.


Some more complex setups involve switching a VIP depending on the
number of application servers that haproxy sees, using
monitor-fail if  This is handy for multi-layer architectures
with an inter-DC LAN for instance.
Do you have a configuration example of this? I don't think there is a 
custom HAProxy OCF for Pacemaker yet - I've just been using the init.d 
script, but sounds like it could use a 'real' Pacemaker script to 
support it properly, especially if you can feed availability information 
of backend systems as attributes to influence where resources are placed.


Is parsing out the http stats page (in csv, xml, or whatever) the 
simplest way to get the current 'state' of HAProxy and the systems it is 
routing to, or is there a better/cleaner/other way to do it?




Re: HAProxy in High Availability

2012-06-29 Thread Laurent Meunier

On 29/06/2012 11:53, David Coulson wrote:

Is parsing out the http stats page (in csv, xml, or whatever) the
simplest way to get the current 'state' of HAProxy and the systems it is
routing to, or is there a better/cleaner/other way to do it?


Hi,

You can use the haprox stats socket to get the current 'state'.

echo show stat | socat unix-connect:/var/run/haproxy.sock stdio

The output is plain text that you can easily parse.

For a more complete description of how the unix socket is used in 
haproxy, go to the doc and look for 9.2. Unix Socket commands.

http://haproxy.1wt.eu/download/1.5/doc/configuration.txt

Regards,
Laurent



Re: Postfix 2.10 introduces support for the PROXY protocol

2012-06-29 Thread Baptiste
Hi all,

The blog article about it:
http://blog.exceliance.fr/2012/06/30/efficient-smtp-relay-infrastructure-with-postfix-and-load-balancers/

I'll come later with a longer article on spam fighting using HAProxy
and postfix and the proxy protocol :)

Cheers