feat(nginx): add config to update the backlog of nginx#625
Merged
sambhav-jain-16 merged 1 commit intoMay 26, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a configurable listen_backlog setting to the nginx config generation so deployments can tune the TCP accept backlog used by nginx listen directives.
Changes:
- Introduces
listen_backlogas a newnginx.ConfigYAML setting and injects it into template params. - Updates nginx component templates (agent/origin/proxy/tracker/build-index) to optionally render
backlog=<value>onlistendirectives.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| nginx/nginx.go | Adds ListenBacklog to config and injects listen_backlog into template params. |
| nginx/config/agent.go | Adds optional backlog=... to the agent listen directive. |
| nginx/config/origin.go | Adds optional backlog=... to the origin listen directive. |
| nginx/config/proxy.go | Adds optional backlog=... to the proxy listen directive(s). |
| nginx/config/tracker.go | Adds optional backlog=... to the tracker listen directive. |
| nginx/config/build-index.go | Adds optional backlog=... to the build-index listen directive. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
705cd73 to
b7d680f
Compare
thijmv
approved these changes
May 23, 2026
b7d680f to
d03c021
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Add a configurable backlog value for nginx for all kraken services
Why?
Although the max value of the accept queue in the host is
The actual value still defaults to the accept queue limit from nginx (511) since
$$\text{Send-Q} = \min(\text{Application Backlog}, \text{somaxconn})$$
This has caused listen drops on the hosts during sudden load (such as prefetching).
This change aims to add a config option to set this limit. If config is not defined, the current defaults are used for backward compatibility.