-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to set upstream zone size and keepalive settings #483
Comments
Would the user expect the system to do this? What is the impact on the user's system if the zone size is not dynamically updated? |
Dynamic calculation of upstream zone accomplishes one thing, as the size of an upstream service grows it ensure that NGINX can handle that. I have an entire write-up around this for NIC to do the same. If not dynamically calculated, it needs to be exposed in a configmap for example or however system tuning is exposed. |
Today we discussed on how this would be valuable for NGINX+ as it does not require a reload when upstreams are added or removed. |
NIC has run into a number of customer situations where customers set their limits so lean as even a back end service scaling event can cause OOM or CPUThrottling situations as a result of the configuration change. Without conscious memory consumption increases that are introduced by a feature like this. While I think this capability is highly valuable, |
blocked by #929 |
The amount of configuration does affect memory consumptions of NGINX - more config you have (including TLS secrets), more memory it will consume. Also note that our architecture includes running the control plane along the data plane, where the control plane has a cache of resources in the cluster in memory. This means that the number of those resources (including HTTPRoutes, Secrets, Endpoints... ) also directly affect memory consumption of NGF pod, without even considering the data plane. However, traffic will much greater affect memory -- as each connection requires memory. Additionally, configuration changes (reloading NGINX) temporarily increases memory consumption, as during a reload both old worker processes and new worker processes coexist. Supporting dynamic calculation of zone sizes will reduce overall memory of NGINX -- because each upstream will use the amount tuned to the number of upstream servers, not some large value that will hold any amount for most cases. Considering all that, I think dynamic calculations of zone sizes will be beneficial and it will not lead to OOMs - other things will lead to OOMs first. |
It doesn't look like it is possible to set zone size or keepalive connections using the N+ API. The API doesn't support updating directives for an upstream group. You can only add/modify/delete servers from upstreams: https://demo.nginx.com/swagger-ui/?_ga=2.44370660.1560926404.1730133990-1687392834.1727393286#/ |
Also note:
|
As a user of NGF
I want NGF to update the upstream zone size for NGINX
So that if I run into errors when due to exceeding my zone size, I can fix them.
As a user of NGF
I want NGF to enable keepalive connections on my route
So that I can optimize the performance of my application.
Acceptance
Dev Notes:
Tasks
The text was updated successfully, but these errors were encountered: