-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docker swarm mode] No round robin when using service #718
Comments
EDIT: It seems like it switches to another container if no activity occurs. Is there a keep-alive between Traefik and the backend or something equivalent? |
@vincentlepot This is kinda to be expected. Træfik in swarmmode points to the virtual ip of the swarm and thus, let the docker swarm mode internal load balancer work. So it really depends on how the swarm mode load balancer handle these. |
Possibly related to moby/moby#25325 |
The strange thing is that when using another reverse proxy - Interlock for instance - I don't have the issue with the same setup. |
@mvdstam Does not really look the same since I don't have any error, just staying on requesting the same container. The other ones are untouched. |
In this particular example the emilevauge/whoami http server sets Keep-Alive due to the default settings in Go HTTP server which is 30 seconds, so if you try to refresh in 31s it switches to another instance. For me it looks that traefik obeys that which i'd not classify as bug. More of a feature which might need on/off configuration switch? @vincentlepot try this (from Docker demos): docker service create --name vote --replicas 5 --label traefik.port=80 --network frontend instavote/vote and it does the balancing on every request. |
I agree with you, this is not a bug, more a configuration switch request. |
Moreover, that sounds like a client side issue, not a traefik one. Hence, I close this one. |
What I tried
But every time I run:
I have the same container responding (instead of seeing different container ids).
That's strange since this should be distributed by docker itself...
The text was updated successfully, but these errors were encountered: