Re: Public ip not showing using HAproxy

From: Nelson Serafica <ntserafica#gmail.com>
Date: Mon, 8 Jun 2009 17:08:37 +0800


Hi Benoit,

Thanks for the reply. After Googling, I found this solution. I don't know if this is relevant but it works though I'm still into testing mode. I added below in listen portion of my haproxy.cfg

*inter 1000 fastinter 200 fall 2*

My source link is
http://www.mail-archive.com/haproxy@formilux.org/msg00120.html

After alternating restarting java on each backends, the error seems disappeared.

I'm gonna test this setup for a couple of days.

Best regards,

Nelson

On Mon, Jun 8, 2009 at 4:13 PM, Benoit <max.maverick#maverick.eu.org> wrote:

>
> Hi,
>
> Well, that's expected behavior, haproxy doesn't interpret protocol while
> proxying,
> so you'll get the 503 as long as the httpchk hasn't found your service
> to be down.
>
> if you want haproxy redispatch to work in this case, you need to set
> backend so it won't even
> accept inbound connections when failed.
>
> benoit
>
> Nelson Serafica a écrit :
> > Hi Joseph,
> >
> > Filtering X-Forwarded-For seems solved the problem. However, I have
> > some problem that bothering me.
> >
> > I tried to simulate things. My backend was running using Java. let's
> > says BACKEND1 and BACKEND2. When I shutdown java on BACKEND1, my
> > webserver replies "ERROR 503 Service Unavailable" and then after 1 to
> > 3 seconds, BACKEND2 is now replace BACKEND1.
> >
> > The purpose of HAProxy actually was there. My only concern is it takes
> > 1 to 3 seconds before it transferred traffic to another server. BTW,
> > the website is dynamic. It has database and authentication on their
> > sessions.
> >
> > This is probably my last concern for now. If this was solve, I'm
> > probably done setting my load balancer.
> >
> > TIA
> >
> >
> > However, 22
> >
> > On Mon, Jun 8, 2009 at 11:34 AM, Nelson Serafica <ntserafica#gmail.com
> > <mailto:ntserafica#gmail.com>> wrote:
> >
> > Hi Joseph,
> >
> > Thanks for the immediate reply. Will inform you the outcome of the
> > haproxy. Need to forward the action to our development team.
> >
> > Best regards,
> >
> >
> > Nelson
> >
> >
> > On Mon, Jun 8, 2009 at 11:21 AM, Joseph Hardeman
> > <jhardeman#colocube.com <mailto:jhardeman#colocube.com>> wrote:
> >
> > Hi Nelson,
> >
> > You need to enable the forwardfor option, put "option
> > forwardfor" in the listen section.
> >
> > The 'forwardfor' option creates an HTTP 'X-Forwarded-For'
> > header which contains the client's IP address. So you will
> > need to configure your web server to capture the
> > X-Forwarded-For header and then you will need to modify your
> > Java app to then see that.
> >
> >
> >
> >
> >
> > --
> > Nelson Serafica
> >
> > http://nelsonts.blogspot.com
>
>
>
>
Received on 2009/06/08 11:08

This archive was generated by hypermail 2.2.0 : 2009/06/08 11:15 CEST