# HAProxy Active/Passive and Sticky Sessions

**URL:** https://discourse.haproxy.org/t/haproxy-active-passive-and-sticky-sessions/2695
**Category:** Help!
**Created:** [July 5, 2018, 10:39pm UTC](https://discourse.haproxy.org/t/haproxy-active-passive-and-sticky-sessions/2695 "2018-07-05T22:39:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![marcusm](https://avatars.discourse-cdn.com/v4/letter/m/3ec8ea/32.png) [@marcusm](https://discourse.haproxy.org/u/marcusm)
#### Post date: [July 5, 2018, 10:39pm UTC](https://discourse.haproxy.org/t/haproxy-active-passive-and-sticky-sessions/2695/1 "2018-07-05T22:39:37Z")

</div>

Hey all,

we want to setup a Active/Passive HAProxy load balancer with sticky sessions enabled. My question is how these sessions can be replicated between both HAProxy Servers, so if one fails, the other one knows which user belongs to which backend. We have a floating IP via VRRP on both servers.

Unfortunately we can not use the cookies option for sticky sessions, since our application does not use cookies.

Is it right to use the peers feature ([http://www.haproxy.org/download/1.5/doc/configuration.txt](http://www.haproxy.org/download/1.5/doc/configuration.txt))? If yes, does someone has a config example? I did not find more information.

---

<div class="post-metadata">

### Author: ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)
#### Post date: [February 7, 2019, 10:06pm UTC](https://discourse.haproxy.org/t/haproxy-active-passive-and-sticky-sessions/2695/2 "2019-02-07T22:06:56Z")

</div>

Correct, you would use stick tables and then use the peer feature to sync the tables between different haproxy nodes.

You can find a config example in the [peer documentation](https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.5).

You can read more about stick tables and peers here:

> **[Introduction to HAProxy Stick Tables - HAProxy Technologies](https://www.haproxy.com/blog/introduction-to-haproxy-stick-tables/)**
>
> HAProxy give you a fast, in-memory storage called stick tables that lets you track user activities, including malicious ones, across requests.
