-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
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.