ok thanks John, let me give that a try
From: John Skarbek <[email protected]>
To: Amol <[email protected]>
Cc: HAproxy Mailing Lists <[email protected]>
Sent: Friday, June 5, 2015 12:18 PM
Subject: Re: haproxy upgrade strategy for primary/secondary model
Amol,
My suggestion would be to leverage the use of keepalived for such an
operation as it is designed for this type of problem. If keepalived
is configured appropriately, there should be minimal impact.
Force a failover such that keepalived on the second node takes over
the IP addresses. Assuming all is configured the same on the second
node, he should pickup and serve or route traffic appropriately.
For additional assistance using my suggestion, it may be better
answered in the keepalived mailing lists.
On Fri, Jun 5, 2015 at 11:44 AM, Amol <[email protected]> wrote:
> Hi All,
> I want to get an idea from you all about a scenario that i am facing..
> So i have 2 haproxy servers as load balancer primary and secondary, all the
> connections always go to primary, when primary fails i have keepalived
> running so the connections will fail-over to secondary
>
> Now when i am upgrading i can upgrade secondary without any issues as the
> server never has active connections, but my question is how can i upgrade
> the primary without causing any downtime to my users.
>
> I have 2 Apache servers running behind the load balancers.
>
> so far i have tried the following on the primary , but have no luck.....
>
> echo "1" > /proc/sys/net/ipv4/ip_forward
> iptables -P FORWARD ACCEPT
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT
> --to-destination <public_ip_secondary>:80
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j DNAT
> --to-destination <public_ip_secondary>:443
> iptables -t nat -A POSTROUTING -j MASQUERADE
> iptables -t nat -L -v
>
> my website does not get redirected to the secondary even after i do this....
>
> any suggestions?