We have a Python UWSGI REST API that handles many calls. When the api calls the peak through an external resource, the queue is immediately filled, since the size of the uWSGI queue is set to 100 by default. After some digging, we found that this corresponds to the setup of the net.core.somaxconn server. And in the case of Kubernetes due to the installation of node.
We found that this documentation uses sysctl to modify net.core.somaxconn. https://kubernetes.io/docs/concepts/cluster-administration/sysctl-cluster/ But this does not work on GKE, as this requires docker 1.12 or later.
We also found this snippet, but it seems really hacked. https://github.com/kubernetes/contrib/blob/master/ingress/controllers/nginx/examples/sysctl/change-proc-values-rc.yaml Isn't DaemonSet better than a companion container?
What would be the best practice to set net.core.somaxconn higher than the default on all NodePool nodes?
No one has answered this question yet.
See related questions: