module: add listener_max_connection_lifetime_ms option#5583
module: add listener_max_connection_lifetime_ms option#5583dethi wants to merge 1 commit intoemissary-ingress:masterfrom
Conversation
d102148 to
fe369e6
Compare
|
Two questions:
|
|
@dethi any chance you could rebase this? It might be nice to support this on upstream connections too, since the same type of issues apply there as well (e.g.: stickiness, ensuring mTLS still works, etc). Thanks! |
|
@kflynn any chance we could get this one reviewed/merged? It solves a couple of issues we've seen in prod... |
|
Upstream option already exist today. I can try to rebase, but I think I was missing something in this change as well for the CRD side of things. My testing kind of stopped when there wasn’t much maintainers activity on PR. But I can try to get back to it. Would be nice to have the CI test running to see what’s missing. |
Oh nice, missed that (https://github.com/emissary-ingress/emissary/blob/master/python/ambassador/envoy/v3/v3cluster.py#L122 for others wondering where it is).
Yeah maybe the commit that added support for upstream is a good reference wrt what is needed for CRDs:
cc: @kflynn or @cindymullins-dw to kick CI 🙏 |
Add listener_max_connection_lifetime_ms, similar to how listener_idle_timeout_ms is implemented. This limit the maximum age of a downstream connections by adding max_connection_duration to the listener's common_http_protocol_options. This option could already be set on the clusters (upstream connections), but setting it on the downstream connections could be useful in multiple scenarios: - to periodically rebalance the load between multiple emissary-ingress, especially when most of the clients are using HTTP2/gRPC and connection stick for a really long time. - when using mTLS (client certificate), to ensure that clients reconnect with their renewed certificate, as Envoy doesn't close the connection when the certificate expires. Fix emissary-ingress#2900 Signed-off-by: Thibault Deutsch <thibault@arista.com>
fe369e6 to
e69102e
Compare
|
Rebased the change on master. Thanks for the example for the implementation. I took a bit of time to dig into my change again and now I remember where I was left confused last time: Now with the commit you shared, I took a look at the Go section and from what I can see, the Module CRD accept a I will get it to run on one of our dev clusters to validate the config, and if we can get the CI tests to run as well. |
Description
Add listener_max_connection_lifetime_ms, similar to how listener_idle_timeout_ms is implemented. This limit the maximum age of a downstream connections by adding max_connection_duration to the listener's common_http_protocol_options.
This option could already be set on the clusters (upstream connections), but setting it on the downstream connections could be useful in multiple scenarios:
to periodically rebalance the load between multiple emissary-ingress, especially when most of the clients are using HTTP2/gRPC and connection stick for a really long time.
when using mTLS (client certificate), to ensure that clients reconnect with their renewed certificate, as Envoy doesn't close the connection when the certificate expires.
Related Issues
Fix #2900
Testing
Checklist
Does my change need to be backported to a previous release?
I made sure to update
CHANGELOG.md.Remember, the CHANGELOG needs to mention:
This is unlikely to impact how Ambassador performs at scale.
Remember, things that might have an impact at scale include:
My change is adequately tested.
Remember when considering testing:
I updated
DEVELOPING.mdwith any any special dev tricks I had to use to work on this code efficiently.The changes in this PR have been reviewed for security concerns and adherence to security best practices.