# Container schedule all on to same host

**URL:** <https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020>\
**Category:** Rancher 1.x\
**Created:** [March 13, 2016, 3:52pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020 "2016-03-13T15:52:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chriss\_Barnard](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chriss_barnard/32/1012_2.png) [@Chriss\_Barnard](https://forums.suse.com/u/Chriss_Barnard)\
**Post date:** [March 13, 2016, 3:52pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/1 "2016-03-13T15:52:47Z")

</div>

Hi,

So I’ve got two container hosts with a label “web.server = true” and I’ve restricted all web applications to run on those hosts. However when I start scaling the containers it puts all the containers on the same host.

Any ideas?

Thanks

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [March 13, 2016, 4:24pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/2 "2016-03-13T16:24:15Z")

</div>

Can you share a screenshot of your hosts? Between the hosts, it will schedule based on how many existing containers are on your host.

Also, can you share your docker-compose.yml?

---

<div class="post-metadata">

**Author:** ![Chriss\_Barnard](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chriss_barnard/32/1012_2.png) [@Chriss\_Barnard](https://forums.suse.com/u/Chriss_Barnard)\
**Post date:** [March 13, 2016, 4:53pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/3 "2016-03-13T16:53:38Z")

</div>

I’ve removed some sensitive data in the compose file, however there’s a fair amount in the dashboard. Currently there are 4 containers running all on one host rather than spreading between hosts with the label “web.server=true”

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/e/e1db5e3febaf3af6f1e6dd21638bf049fd70d80e.PNG)

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [March 13, 2016, 5:32pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/4 "2016-03-13T17:32:04Z")

</div>

How many containers are on each host?

---

<div class="post-metadata">

**Author:** ![Chriss\_Barnard](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/chriss_barnard/32/1012_2.png) [@Chriss\_Barnard](https://forums.suse.com/u/Chriss_Barnard)\
**Post date:** [March 13, 2016, 8:44pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/5 "2016-03-13T20:44:37Z")

</div>

4 on one node and zero on the other for the application stack in question.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [March 13, 2016, 9:01pm UTC](https://forums.suse.com/t/container-schedule-all-on-to-same-host/2020/6 "2016-03-13T21:01:33Z")

</div>

What other containers are on the host with none for the application stack? Rancher schedules containers on hosts based on how many containers (all in) are on each host.

Example:

Host A has 5 containers.  
Host B has no containers.

If I try to schedule between host A and B. 5 containers will be launched on Host A before starting to schedule containers on Host B.

There is no guarantee of spread of containers onto hosts based on label. There is an open Github issue for it.

> <https://github.com/rancher/rancher/issues/2247>
