caddy icon indicating copy to clipboard operation
caddy copied to clipboard

Load balancer sticky cookie should have a Max-Age configuration

Open JasonYuan869 opened this issue 8 months ago • 4 comments

I have a service routed with the following

reverse_proxy backend-blue:3000 backend-green:3000 {
    lb_policy cookie {
        fallback first
    }
}

This allows me to do zero-downtime upgrades on a stateful service by switching the order of the upstreams.

I think it would be useful to allow configuration of a Max-Age property for the cookie to ensure that eventually a client application will use the new backend when the cookie expires.

If this is a feature that seems appropriate for the project, I would love to help contribute!

JasonYuan869 avatar Jun 13 '24 04:06 JasonYuan869