How to configure HAProxy to maintain sessions when the active backend realserver goes unreachable in RHEL7?

Solution Verified - Updated -

Issue

  • I have configured haproxy and keepalived in two load balancers linked with two backend servers where one backend server is active and another is backup.
  • My application has sessions in every page, now I want that when the active server is down, then the backup server should load the same page the user was using instead of going to the login page because of not maintaining sessions.
  • How to configure HAProxy to maintain sessions when the active backend realserver goes unreachable?

Environment

  • Red Hat Enterprise Linux (RHEL) 7.2.
  • HAproxy load balancer setup.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.