Find out ideal amount of workers

Hello all,

Due to some issues we are currently experiencing. E.g. see: One or some workers in one of 14 kong nodes still use the old cache after the kong api is updated · Issue #8517 · Kong/kong · GitHub
We are trying to find out if it makes sense for us to use only one worker process instead of two.

I searched for quite some time but was not able to find any potential disadvantages with using only one worker.

Our setup:
Kong Gateway deployed as a DaemonSet on three k8s nodes, with each pod connecting to a shared redis instance and a PostgreSQL database.

Thanks a lot in advance!

Hi all,

Does anybody have an idea?

The short version of my question is: “Is there a disadvantage to using only one worker instead of several?

Thanks!

Generally from working with nginx on bare metal systems, worker processes on bare metal systems are scaled up based on the number of cpus you have, so 8 cpu system gets 8 workers. This helps scale performance for larger numbers of RPS. If you are not hitting any limitations or are not seeing any performance issues with 1 worker, or you only have 1-2 cpu cores allocated to your pods, then 1 worker would be fine.

Hi @wiibanks,
Thanks for your answer.

Yes in our case we are running on nodes with 2 cpus. After doing some more research I also figured that it should work just fine with only one worker.
The only potential limiting factor I could find were the max worker_connections.