moby / moby/swarmkit

Placement constraints

Open
#3,063 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What I want to achieve:

Ensure replicas are spread across availability zones and never run in the same.

current approach:

I am currently doing this through placement preferences.

The problem:

However, they are that. Preferences. If one zone becomes unavailable, the other replica will be scheduled in the other zone which already contains a replica.

This is particularly troublesome, as the service is backed by persistent storage (ebs), which is not replicated across availability zones; meaning that the replica will start up with an empty volume in that zone.

Is it possible to set a placement preference similar to how constraints work? So that I can guarantee a (one) replica will always run in a distinct zone, if the other zone is not available then do not start the replica? If not, is there an alternative way of achieving this?

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

The issue names no files, tests, or entry points; begin by locating the scheduler's placement-preference and constraint handling. Determine whether hard availability-zone separation is feasible for replicas backed by EBS, then define the expected behavior or an alternative approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, go
Domain
cloud, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.