Based on the documentation here, https://nginx.org/en/docs/ngx_core_module.html#worker_processes
The worker_processes is defined as the number of worker processes.
The optimal value depends on many factors including (but not limited to) the number of CPU cores, the number of hard disk drives that store data, and load pattern. When one is in doubt, setting it to the number of available CPU cores would be a good start (the value “auto” will try to autodetect it).
Most of the guides recommend setting this value to the number of cores on the server or set to auto which itself sets it to the number of cores on the machine.
I'm running OpenResty on kubernetes so when I check the number of CPU cores from inside the openresty pod, it returns me the number of cores my physical machine (node) has. However, with CPU requests & limits on the k8s, all the 8 cores wouldn't be available for the pod.
So what should be worker_processes's value for shared CPUs in case of kubernetes?
Thanks!