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

Per upstream object configurable keepalive timeout option #14062

Open
guoard opened this issue Dec 29, 2024 Discussed in #8302 · 0 comments
Open

Per upstream object configurable keepalive timeout option #14062

guoard opened this issue Dec 29, 2024 Discussed in #8302 · 0 comments

Comments

@guoard
Copy link

guoard commented Dec 29, 2024

Discussed in #8302

Originally posted by zeghong January 18, 2022
I was wondering if we can add an option to customize the upstream_keepalive_idle_timeout per upstream object.

There is a global configuration upstream_keepalive_idle_timeout (Link) which controls the global default upstream keepalive timeout, but i think it would be helpful if we can customize this value per upstream object.

Here is a typical scenario:
Gunicorn is a popular Python WSGI HTTP server, and it's basic sync worker does not support persistent connections. So the deployment guide recommends the nginx directive keepliave_timeout been set to 5 (seconds), which is shorter than kong's default value 60。It the keepalive idle timeout can be customized without affecting other workload with persistent connections support, it will helps to reduce the number of TIME_WAIT TCP sockets.

Since the original nginx keepalive_timeout directive value is set in the upstream context, i assumes this feature is realizable from technical point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant