Per upstream object configurable keepalive timeout option #8302
zeghong
started this conversation in
Ideas and feature requests
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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 to5
(seconds), which is shorter than kong's default value60
。It the keepalive idle timeout can be customized without affecting other workload with persistent connections support, it will helps to reduce the number ofTIME_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.Beta Was this translation helpful? Give feedback.
All reactions