moby / moby/swarmkit

Orchestrator does not handle dynamic updates in tasks scaling

Open
#1,156 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/orchestration kind/enhancement
Dominant language
Go
Stars
3.7k
Forks
676
Avg merge
4d 9h
Merged PRs (30d)
6

Description

Considering the following scenario using docker integration:

$ docker service scale test=1000

# Directly after
$ docker service scale test=50

The orchestrator goes through scheduling the 1000 tasks before scaling down to 50.

The orchestrator should dynamically handle that case and only converge on the latest input value (in this case 50). This is risky to assume that any input value is a valid one and we should allow a user to correct a potential mistake, otherwise the cluster can be made slow or unresponsive by providing very high and unreasonable values.

See docker/docker#24027 for more context.

/cc @stevvooe @nishanttotla (couldn't find an issue tracking this but let me know if this looks like a dupllicate)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Docker scaling sequence: scale a service to 1000 tasks and immediately back to 50, then trace how the orchestrator processes successive desired replica counts. Done means obsolete scheduling work is superseded and the cluster converges on the latest requested value instead of processing all 1000 tasks first.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.