HTTP Connection Lifecycle Management#

Upstream/Downstream connection uncoupling#

The HTTP/1.1 specification has this design: HTTP Proxy is a L7 proxy and should be separate from the L3/L4 connection lifecycle. Therefore, headers like Connection: Close and Connection: Keepalive from Downstream will not be forwarded to Upstream by the Envoy. The lifecycle of the Downstream connection is of course controlled by the Connection: xyz directive. However, the connection lifecycle of the Upstream connection is not affected by the connection lifecycle of the Downstream connection. That is, there are two separate connection lifecycles.

Github Issue: HTTP filter before and after evaluation of Connection: Close header sent by upstream#15788 说明了这个问题: This doesn’t make sense in the context of Envoy, where downstream and upstream are decoupled and can use different protocols. I’m still not completely understanding the actual problem you are trying to solve?

Racing conditions after Envoy connection closure#