# Are sticky sessions preserved on reloads?

**URL:** <https://discourse.haproxy.org/t/are-sticky-sessions-preserved-on-reloads/4941>\
**Category:** Help!\
**Created:** [March 10, 2020, 1:16pm UTC](https://discourse.haproxy.org/t/are-sticky-sessions-preserved-on-reloads/4941 "2020-03-10T13:16:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lzkill](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/lzkill/32/1105_2.png) [@lzkill](https://discourse.haproxy.org/u/lzkill)\
**Post date:** [March 10, 2020, 1:16pm UTC](https://discourse.haproxy.org/t/are-sticky-sessions-preserved-on-reloads/4941/1 "2020-03-10T13:16:34Z")

</div>

I’ve been using haproxy sticky sessions in front of a stateful application for some time now. Are these header based routing rules preserved if we restart/reload the service? How could we achieve this?

Thanks in advance!

---

<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:** [March 10, 2020, 9:06pm UTC](https://discourse.haproxy.org/t/are-sticky-sessions-preserved-on-reloads/4941/2 "2020-03-10T21:06:55Z")

</div>

Sticky sessions as in the you are using a stateful stick-table?

Then no, you’d have to configure it. You can do that be configuring [peer replication](https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#3.5) for stick tables; even you don’t have multiple haproxy instances. You specify a peer where peername is a local peer name, so the haproxy instance that is about to start connects to the old process and downloads the content of the stick table:

[https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#3.5-peer](https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#3.5-peer)
