2

I have following configuration with

worker_process 4;

But I noticed that it always hits only 1 worker.

I am testing on a local Centos VM. I am doing curl http call on specific port and added a file with 1000 curl requests and ran them from multiple terminal windows.

But see alll of them hit only 1 worker. Is there a way that I can have atleast more than 1 worker started. Can someone please share their knowledge on this.

javadev
  • 41
  • 2

1 Answers1

0

https://blog.cloudflare.com/the-sad-state-of-linux-socket-balancing/

In the epoll-and-accept the load balancing algorithm differs: Linux seems to choose the last added process, a LIFO-like behavior. The process added to the waiting queue most recently will get the new connection. This behavior causes the busiest process, the one that only just went back to event loop, to receive the majority of the new connections. Therefore, the busiest worker is likely to get most of the load.

un.def
  • 1,200
  • 6
  • 10