# \`max\_workers\` when starting multiple services

**URL:** <https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216>\
**Category:** googlegroup\
**Created:** [October 27, 2017, 5:10pm UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216 "2017-10-27T17:10:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jukowitz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@Jukowitz](https://discourse.nameko.io/u/Jukowitz)\
**Post date:** [October 27, 2017, 5:10pm UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216/1 "2017-10-27T17:10:19Z")

</div>

Hi!

Still loving Nameko - So many problems, solved so quickly!

One question about the `max_workers` config.

If I run multiple instances on the Nameko runner, for example:

```auto
nameko run --config=config.yaml service:ServiceA
nameko run --config=config.yaml service:ServiceB
nameko run --config=config.yaml service:ServiceC

```

I expect that they will each get thier own pool of workers up to  
`max_workers`.

But what happens if I run a single instance, and let Nameko register the  
individual services? For example:

```auto
nameko run --config=config.yaml service

```

My guess is that the `max_workers` pool size is shared between all the  
services, but I thought I'd just ask the question 🙂

Many thanks,

Geoff

---

<div class="post-metadata">

**Author:** ![David\_Szotten](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.nameko.io/david_szotten/32/6_2.png) [@David\_Szotten](https://discourse.nameko.io/u/David_Szotten)\
**Post date:** [October 27, 2017, 6:33pm UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216/2 "2017-10-27T18:33:21Z")

</div>

Hi Geoff,

Each service runs in its own independent container which is where limits  
like max\_workers are set, so each service would still have its own worker  
pool

Best,  
David

> **···**
>
> On Friday, 27 October 2017 18:10:19 UTC+1, juko...@gmail.com wrote:
> 
> > Hi!
> > 
> > Still loving Nameko - So many problems, solved so quickly!
> > 
> > One question about the `max_workers` config.
> > 
> > If I run multiple instances on the Nameko runner, for example:
> > 
> > ```auto
> > nameko run --config=config.yaml service:ServiceA
> > nameko run --config=config.yaml service:ServiceB
> > nameko run --config=config.yaml service:ServiceC
> > 
> > ```
> > 
> > I expect that they will each get thier own pool of workers up to  
> > `max_workers`.
> > 
> > But what happens if I run a single instance, and let Nameko register the  
> > individual services? For example:
> > 
> > ```auto
> > nameko run --config=config.yaml service
> > 
> > ```
> > 
> > My guess is that the `max_workers` pool size is shared between all the  
> > services, but I thought I'd just ask the question 🙂
> > 
> > Many thanks,
> > 
> > Geoff

---

<div class="post-metadata">

**Author:** ![Jukowitz](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@Jukowitz](https://discourse.nameko.io/u/Jukowitz)\
**Post date:** [October 27, 2017, 6:44pm UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216/3 "2017-10-27T18:44:33Z")

</div>

That is awesome news. I have been running services in separate Supervisord  
processed 🙂 But now I'm running more and more microservices, the  
supervisord lists are getting out of hand 🙂

Thanks for the confirmation David.

> **···**
>
> On Friday, October 27, 2017 at 11:33:22 AM UTC-7, David Szotten wrote:
> 
> > Hi Geoff,
> > 
> > Each service runs in its own independent container which is where limits  
> > like max\_workers are set, so each service would still have its own worker  
> > pool
> > 
> > Best,  
> > David
> > 
> > On Friday, 27 October 2017 18:10:19 UTC+1, juko...@gmail.com wrote:
> > 
> > > Hi!
> > > 
> > > Still loving Nameko - So many problems, solved so quickly!
> > > 
> > > One question about the `max_workers` config.
> > > 
> > > If I run multiple instances on the Nameko runner, for example:
> > > 
> > > ```auto
> > > nameko run --config=config.yaml service:ServiceA
> > > nameko run --config=config.yaml service:ServiceB
> > > nameko run --config=config.yaml service:ServiceC
> > > 
> > > ```
> > > 
> > > I expect that they will each get thier own pool of workers up to  
> > > `max_workers`.
> > > 
> > > But what happens if I run a single instance, and let Nameko register the  
> > > individual services? For example:
> > > 
> > > ```auto
> > > nameko run --config=config.yaml service
> > > 
> > > ```
> > > 
> > > My guess is that the `max_workers` pool size is shared between all the  
> > > services, but I thought I'd just ask the question 🙂
> > > 
> > > Many thanks,
> > > 
> > > Geoff

---

<div class="post-metadata">

**Author:** ![David\_Szotten](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.nameko.io/david_szotten/32/6_2.png) [@David\_Szotten](https://discourse.nameko.io/u/David_Szotten)\
**Post date:** [October 27, 2017, 7:00pm UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216/4 "2017-10-27T19:00:25Z")

</div>

np

note that there are other reasons you might want to run separate processes,  
e.g. limiting the impact of something accidentally hogging the cpu and  
blocking the event loop

best,  
d

> **···**
>
> On Friday, 27 October 2017 19:44:33 UTC+1, juko...@gmail.com wrote:
> 
> > That is awesome news. I have been running services in separate Supervisord  
> > processed 🙂 But now I'm running more and more microservices, the  
> > supervisord lists are getting out of hand 🙂
> > 
> > Thanks for the confirmation David.
> > 
> > On Friday, October 27, 2017 at 11:33:22 AM UTC-7, David Szotten wrote:
> > 
> > > Hi Geoff,
> > > 
> > > Each service runs in its own independent container which is where limits  
> > > like max\_workers are set, so each service would still have its own worker  
> > > pool
> > > 
> > > Best,  
> > > David
> > > 
> > > On Friday, 27 October 2017 18:10:19 UTC+1, juko...@gmail.com wrote:
> > > 
> > > > Hi!
> > > > 
> > > > Still loving Nameko - So many problems, solved so quickly!
> > > > 
> > > > One question about the `max_workers` config.
> > > > 
> > > > If I run multiple instances on the Nameko runner, for example:
> > > > 
> > > > ```auto
> > > > nameko run --config=config.yaml service:ServiceA
> > > > nameko run --config=config.yaml service:ServiceB
> > > > nameko run --config=config.yaml service:ServiceC
> > > > 
> > > > ```
> > > > 
> > > > I expect that they will each get thier own pool of workers up to  
> > > > `max_workers`.
> > > > 
> > > > But what happens if I run a single instance, and let Nameko register the  
> > > > individual services? For example:
> > > > 
> > > > ```auto
> > > > nameko run --config=config.yaml service
> > > > 
> > > > ```
> > > > 
> > > > My guess is that the `max_workers` pool size is shared between all the  
> > > > services, but I thought I'd just ask the question 🙂
> > > > 
> > > > Many thanks,
> > > > 
> > > > Geoff

---

<div class="post-metadata">

**Author:** ![geoffjukes](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.nameko.io/geoffjukes/32/44_2.png) [@geoffjukes](https://discourse.nameko.io/u/geoffjukes)\
**Post date:** [July 13, 2020, 5:44am UTC](https://discourse.nameko.io/t/max-workers-when-starting-multiple-services/216/5 "2020-07-13T05:44:09Z")

</div>

Nearly 3 years later and this reply helped me solve a performance issue I was having. Thanks again!
