Hi,

On Thu, Dec 12, Aleh Kurnitsou wrote:
> Could you please explain me how can I change my current config line:
> “server-template server- 3 nginx-service:80 check resolvers docker
> init-addr libc,none”?
> 
> 
> I would to use sticky session, but i can't find any good way how it
> possible to do with server template.
> 

I haven't tested it, but have you tried dynamic cookies with
dynamic-cookie-key
(https://cbonte.github.io/haproxy-dconv/2.0/configuration.html#dynamic-cookie-key)
(https://www.haproxy.com/blog/whats-new-haproxy-1-8/#dynamic-cookies)

-Jarno

> I tried to use config from my dedicated servers:
> cookie serverid insert indirect nocache maxidle 15m maxlife 1h
> server s1 10.0.1.3:80 cookie s1 check
> 
> 
> But it works only when docker service " nginx-service " runned, after
> scaling or when i'm replacing containers it doesn't work. :(

-- 
Jarno Huuskonen

Reply via email to