On Thu, Aug 23, 2012 at 03:49:33PM +0800, James Wise wrote:
> Hi All,
>
> I want to achieve the HAProxy + SSL + Stickiness session.
>
> This is my configurations:
>
> HAProxy - http://pastebin.com/rBYWc5zt
> Stunnel - http://pastebin.com/e0nRYQ3u
>
> So far, I have successfully test the HAProxy and SSL. My problem is that:
>
> (1) when I try to rename the "checked.txt" from WEBSERVERS1, I'm still
> seeing traffic coming in on WEBSERVERS1. The traffic should be going to
> WEBSERVERS2. When I clear the browser cache and access the site apps again,
> the traffic is going to WEBSERVERS2. Maybe I have something wrong in my
> haproxy configuration under in backend??
In your config I'm seeing this :
option httpchk GET /checked.txt HTTP/1.0
http-check disable-on-404
server WEBSERVERS1 90.xx.xx.1:80 weight 1 cookie WEBSERVERS1 check
"http-check disable-on-404" means exactly that if a health check returns
404, then the server does not want to get new sessions but will still serve
requests which have a valid cookie pointing to it. This is exactly what you
are observing, it's the graceful shutdown mode. If you wanted to use this
/checked.txt file to mark the server down, then simply remove this line and
it will do what you want.
> (2) If #1 is fixed, how can I apply that in SSL?
It's exactly the same. You apply the same change to your port 81 and it
will work.
Regards,
Willy