# Sticky sessions and drain not working together

**URL:** <https://discourse.haproxy.org/t/sticky-sessions-and-drain-not-working-together/6876>\
**Category:** Help!\
**Created:** [September 2, 2021, 1:06pm UTC](https://discourse.haproxy.org/t/sticky-sessions-and-drain-not-working-together/6876 "2021-09-02T13:06:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [September 2, 2021, 6:55pm UTC](https://discourse.haproxy.org/t/sticky-sessions-and-drain-not-working-together/6876/2 "2021-09-02T18:55:07Z")

</div>

This is expected behavior:

> Setting the mode to “drain” only removes the server  
> from load balancing but still allows it to be checked and to accept new  
> persistent connections. Changes are propagated to tracking servers if any.

Seems like what you really want is `maint` mode?

> Setting the state to “maint” disables any traffic  
> to the server as well as any health checks.

---

_[View the full topic](https://discourse.haproxy.org/t/sticky-sessions-and-drain-not-working-together/6876)._
