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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content