envoyproxy / envoy

Cloud-native high-performance edge/middle/service proxy
https://www.envoyproxy.io
Apache License 2.0
24.51k stars 4.73k forks source link

Buffer Accounting #15791

Open KBaichoo opened 3 years ago

KBaichoo commented 3 years ago

Buffer Accounting: Account for allocated bytes in buffers charging to a particular downstream.

Description: Buffer limits for Envoy are too soft. This can lead to excessive buffering, potentially OOMing Envoy. The existing mechanism which we have don't allow us to quickly close streams for existing connections to reclaim resources if we're facing memory pressure.

If we tracked how much allocated bytes in buffers a stream uses, then we would be able to create an overload manager action to help shed expensive streams when under memory pressure.

More details in the design doc.

Hope this makes sense. Thanks!

KBaichoo commented 3 years ago

/assign @KBaichoo