Hello, On Tue, Oct 07, 2025 at 11:17:30AM +0200, Stephan Seitz wrote: > Hello! > > If we want to update a backend, we want to disable it and then wait for some > minutes so that every session is finished (or at least most of them) before > we start the update process. > > However, setting the backend in the maint state drops all existing sessions > at once instead of stopping new connections.
No, maintenance mode doesn't kill existing connections, it only kills *idle* connections, and makes the server non-selectable by LB algorithms and stickiness. However if your traffic is made of many requests from a same user who needs to stick to a server, while existing connections will not be broken, subsequent requests will be directed to another server and may break the user's experience (e.g. have to log in again). > So how do I do this right? It seems there is a drain state as well, but I > don't really understand if this will do what I want. The drain state will only let existing connections continue and request having a valid cookie matching that server as well. It's exactly the same as assigning it a weight of zero. Thus traffic from a user logged into that server will continue but no new user will be sent there. Normally the clean way to proceed is to first set it to drain state, wait a bit, then set it to maint, wait a bit, then that's fine. Hoping this helps, Willy

