Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Create "MAX_PER" constraint. #3515

Closed
EvanKrall opened this issue Mar 17, 2016 · 2 comments
Closed

Create "MAX_PER" constraint. #3515

EvanKrall opened this issue Mar 17, 2016 · 2 comments

Comments

@EvanKrall
Copy link
Contributor

For many of our applications, we'd like to limit the damage that can be caused by a single host (or AZ or whatever) going down.

For small applications, a constraint of ["hostname", "UNIQUE"] is sufficient, but when the number of instances of the application is large (similar to or larger than the number of hosts in the cluster), this is too strict. On a cluster with 30 hosts and an application with 100 instances, Marathon won't be able to deploy all the instances. If the application is asking for 30 or 25 instances, Marathon may still not be able to deploy all of them, because some of the hosts may be full with other tasks.

For applications with higher numbers of instances, it's often tolerable to put more than one instance on a box. Something like this is expressible with ["hostname", "GROUP_BY", 5], which would prevent more than 6 instances in the 30-instance example from being deployed to a single box. However, my understanding is that GROUP_BY would prevent any host from having at most 1 more instance than any other host, and so the constraints could become unsatisfiable in some cases.

If Marathon had a MAX_PER constraint, such that ["hostname", "MAX_PER", "6"] would prevent more than 6 instances from being deployed on a single host, this would satisfy my requirements of not putting too many eggs in one basket, without being as strict as GROUP_BY or UNIQUE.

([x, "MAX_PER", "1"] would be equivalent to [x, "UNIQUE"].)

@janisz
Copy link
Contributor

janisz commented Apr 25, 2016

It's related to #3220 MAX_PER could be used to spread tasks evenly on a cluster

tmmi added a commit to tmmi/marathon that referenced this issue May 11, 2016
@tmmi
Copy link
Contributor

tmmi commented May 12, 2016

Perhaps in such a way #3885

tmmi added a commit to tmmi/marathon that referenced this issue May 12, 2016
tmmi added a commit to tmmi/marathon that referenced this issue May 16, 2016
tmmi added a commit to tmmi/marathon that referenced this issue Jun 16, 2016
tmmi added a commit to tmmi/marathon that referenced this issue Jun 16, 2016
tmmi added a commit to tmmi/marathon that referenced this issue Jun 16, 2016
tmmi added a commit to tmmi/marathon that referenced this issue Jun 16, 2016
janisz added a commit to janisz/marathon that referenced this issue Jun 17, 2016
@d2iq-archive d2iq-archive locked and limited conversation to collaborators Mar 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants