Skip to content

Add feature flag for testing connections with smaller Yamux window size

Sami Hiltunen requested to merge smh-fix-buffer-size into master

Praefect configures a 16MB Yamux window size by default. This used to be fine with backchannels as there were a limited number of streams opened. Now that the sidechannels are using the same Yamux session, this causes the buffers to grow with each request that is using a sidechannel causing Praefects memory usage to balloon. To prevent that, we should use smaller buffers that match the client's buffer size to ensure Praefect doesn't buffer more than what it can reasonably send to the client. Changing this configuration is risky as the window size affects the network throughput. This commit adds a second set of connections to each storage with a different Yamux configuration. The new set of connections can be gradually enabled by toggling a feature flag. The new set of connections are only used for the proxied traffic. We don't have the feature flags available in background contexts and the Praefect intercepted RPCs don't add meaningful load to justify the work to toggle them over a feature flag. The proxied traffic should give us a sufficient idea on how the new configuration performs.

Part of #4642 (closed)

Edited by Sami Hiltunen

Merge request reports