Skip to content
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 rebalancing | Resurrection #30666

Closed
viveky4d4v opened this issue Feb 2, 2017 · 1 comment
Closed

Docker swarm mode rebalancing | Resurrection #30666

viveky4d4v opened this issue Feb 2, 2017 · 1 comment

Comments

@viveky4d4v
Copy link

Swarm mode

Rebalancing containers automatically when the node comes back in life . Kind of Resurrection .

Let's say if i have one manager & one worker .-

If worker dies , manager will schedule all containers on itself .
Worker comes back in life & manager doesn't rebalance containers & all containers sit on manager .
Now if manager dies , our stack goes down even if worker is up & running .
Ideally manager should automatically balance the containers when worker comes back in life by moving the oldest container back to the worker . I don't know how this can be done without downtime ( in case you have just one application container ) .
OR
if the scheduler makes some decision like in case of a single application container it should not move it back to worker to remove downtime but it should do it if we have multiple replicas.

PS - I understand it's not efficient way to use swarm, we should use at least 3 managers but i caught up in this situation so i thought to get some ideas from community.

@thaJeztah
Copy link
Member

This is a duplicate of #24103; the reason behind this is that rebalancing actually can cause service interruption (i.e., why kill a healthy container?)

I don't know how this can be done without downtime ( in case you have just one application container ) .

Currently not, but there's some improvements made here; #30261

Even in that case, killing a task (container), and starting a new one may not always be seamless, depending on "what" is running in the container.

Now if manager dies , our stack goes down even if worker is up & running .

Your application would still fail if one of your containers is running on the manager; if the manager dies, no new containers will be started.

I'll close this issue, because it's a duplicate of #24103, but I hope the above explains a bit better why this is not implemented.

Feel free to continue the discussion after I closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants