-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Support for configurable Keep-Alive for both frontend and backend #727
Comments
I think this feature is pretty urgent for production use. Without it, traefik will generate errors for non-idempotent requests - go http client only retries closed idle connections for idempotent requests. Only way to prevent this is to set the forwarder's transport idle timeout to less than our server timeouts. In golang 1.6 this isn't straightforward, while 1.7 has added the idle timeout that can be used for this. I'm not sure how easy it will be to do this, it probably requires a change to the oxy library that traefik uses. |
Adding my reasoning for this request: optimal configuration for Akamai <> origin is keepalive of 301 seconds (https://community.akamai.com/customers/s/question/0D50f00005RtqgwCAB/default-pconn-timeout?language=en_US) but we don't want Traefik <> backend service connections persisting this long |
+1 Common use-case:(disregard -- the fix is to sleep in a preStop lifecycle hook until traefik can update its backend list)
|
So... currently there is no way to completely disable keepalives between Traefik and a backend? |
There is: #3237 (comment) |
#4983 is merged, and is in v2.0.0 (still beta):
Closing this issue now, many thanks to everyone involved. |
Hi,
I want to propose adding new configuration options prompt by #718.
While certainly its nice to have Keep-Allive from end to end sometimes we don't have full control over the applications we deploy.
In some situations it's good to have more granular control over the connection, so for example if we use the application just to print few bits of information we don't need the connection staying open for another 30 seconds.
For example when creating new service with docker swarm we can just add new label for this particular frontend:
--label traefik.frontend.rule=Client-KeepAlive:5,Backend-KeepAlive:0
which will tell traefik to keep the connection to client browser open for 5 sec but close connection to backend after the response is finished.So the full service command becomes:
I don't think this is urgent feature but certainly good to have.
Cheers.
The text was updated successfully, but these errors were encountered: