Skip to content
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

Increase default upstream zone size for NGINX Plus #2009

Merged
merged 2 commits into from
Sep 27, 2021

Conversation

pleshakov
Copy link
Contributor

Proposed changes

NGINX Plus R25 allocates more memory for storing upstream server (peer) data: +720 bytes per peer. This means upstream server zones will use more memory to accommodate that data.

If a zone is full, NGINX Plus will fail to reload and fail to add more upstream servers via the API.

To prevent reload failures after an upgrade to R25, this commit increases the default upstream zone size for NGINX Plus from 256K to 512K.

@github-actions github-actions bot added the documentation Pull requests/issues for documentation label Sep 24, 2021
@pleshakov pleshakov changed the title [WIP] Increase default upstream zone size for NGINX Plus Increase default upstream zone size for NGINX Plus Sep 25, 2021
@pleshakov pleshakov added the change Pull requests that introduce a change label Sep 25, 2021
@@ -318,7 +322,7 @@ def test_upstream_zone_size_0(self, cli_arguments, kube_apis,
if cli_arguments["ic-type"] == "nginx-plus-ingress":
print("Run assertions for Nginx Plus case")
assert "zone " in result_conf
assert " 256k;" in result_conf
assert " 512k;" in result_conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing failures in the pipeline, although for some reason it is not showing up in the PR: https://gitlab.com/f5/nginx/kic/kubernetes-ingress/-/jobs/1623726013

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for pointing out. forgot to update the template for N+ for Ingress, it still uses 256k default:

	zone {{$upstream.Name}} {{if ne $upstream.UpstreamZoneSize "0"}}{{$upstream.UpstreamZoneSize}}{{else}}256k{{end}};

NGINX Plus R25 allocates more memory for storing upstream server
(peer) data: +720 bytes per peer. This means upstream server
zones will use more memory to accommodate that data.

If a zone is full, NGINX Plus will fail to reload and fail to
add more upstream servers via the API.

To prevent reload failures after an upgrade to R25, this commit
increases the default upstream zone size for NGINX Plus from 256K
to 512K.
Copy link
Member

@lucacome lucacome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to have two different sizes for OSS and Plus (since it's just an increase of 256k) and the added logic that comes with it, but I'm approving the PR since it's time-sensitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Pull requests that introduce a change documentation Pull requests/issues for documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants