# Prevent service from scaling

**URL:** <https://forums.suse.com/t/prevent-service-from-scaling/658>\
**Category:** Rancher 1.x\
**Created:** [October 8, 2015, 6:25pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658 "2015-10-08T18:25:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergeleschinsky](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@sergeleschinsky](https://forums.suse.com/u/sergeleschinsky)\
**Post date:** [October 8, 2015, 6:25pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/1 "2015-10-08T18:25:02Z")

</div>

We are checking Rancher applicability for our needs and so far so good except one specifics of our stack - we need to guarantee that one service is a “singleton”. Is it currently possible to set it somehow - i.e. remove “scaling up” functionality **for one service only**?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [October 9, 2015, 4:46pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/2 "2015-10-09T16:46:40Z")

</div>

The only **_guaranteed_** way currently is to run a single standalone container (in the Infrastructure tab) instead of a service.

With a service the container will get automatically scheduled to a different host if the one it’s on disconnects from Rancher (or enough health checks to the container fail, if configured).

**Often** this is because it’s dead, but we have no way of knowing for sure whether the old container is still actually in fact running out there or not.

---

<div class="post-metadata">

**Author:** ![sergeleschinsky](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@sergeleschinsky](https://forums.suse.com/u/sergeleschinsky)\
**Post date:** [October 12, 2015, 6:01pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/3 "2015-10-12T18:01:04Z")

</div>

thank you for the workaround! Ideally I’d like to see a label which can enforce scaling limits or something like that. Thanks once again!

---

<div class="post-metadata">

**Author:** ![willchan](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/willchan/32/2856_2.png) [@willchan](https://forums.suse.com/u/willchan)\
**Post date:** [October 14, 2015, 3:41am UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/4 "2015-10-14T03:41:04Z")

</div>

We just released 0.41 which contains our Service Selector feature. This will allow you create a create a service (empty one as well), add a selector label, and allow any created containers with a label that fulfills the “selector” label to automatically join that service. You can then take advantage of the DNS service discovery feature. By doing this, the scale functionality is no longer applicable as it is controlled by labels.

---

<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:** [November 6, 2015, 10:07pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/5 "2015-11-06T22:07:32Z")

</div>



---

<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:** [November 6, 2015, 11:32pm UTC](https://forums.suse.com/t/prevent-service-from-scaling/658/6 "2015-11-06T23:32:15Z")

</div>

@sergeleschinsky I’ve created this Github issue to track your request.

> <https://github.com/rancher/rancher/issues/2590>
>
> Per http://forums.suse.com/t/prevent-service-from-scaling/658
> and
> http://forums.suse.com/t/how-to-disable-scaling-of-service/894
> Users would like a way to put a maximum limit of containers on a service.
