Skip to content
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

buffer size: expand response buffer limit to 1Mb #1987

Merged
merged 1 commit into from
Dec 24, 2021
Merged

Conversation

junr03
Copy link
Member

@junr03 junr03 commented Dec 24, 2021

Description: expands the buffer size of the DirectStream from 65kb to 1mb.
Risk Level: low - previously responses reaching the limit size would have resulted in an error.
Testing: tested with the example apps and this Envoy diff

diff --git a/source/common/http/filter_manager.cc b/source/common/http/filter_manager.cc
index 2864da7758..ec102fa515 100644
--- a/source/common/http/filter_manager.cc
+++ b/source/common/http/filter_manager.cc
@@ -1531,6 +1531,7 @@ Buffer::InstancePtr ActiveStreamEncoderFilter::createBuffer() {
       [this]() -> void { this->responseDataDrained(); },
       [this]() -> void { this->responseDataTooLarge(); },
       []() -> void { /* TODO(adisuissa): Handle overflow watermark */ });
+  ENVOY_LOG_MISC(error, "setting buffer limit {}", parent_.buffer_limit_);
   buffer->setWatermarks(parent_.buffer_limit_);
   return buffer;
 }

Signed-off-by: Jose Nino <jnino@lyft.com>
@junr03
Copy link
Member Author

junr03 commented Dec 24, 2021

@alyssawilk you were totally right about #1934 (comment). The true origin of that buffer limit is the DirectStream in Envoy Mobile. This PR increases the limit to 1mb for now, I have created #1988 to make the setting configurable.

I followed the response_payload_too_large message to the filter manager where the local response is sent, and from there to where responseDataTooLarge() is used. And then used the log above to see the value.

Copy link

@buildbreaker buildbreaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@junr03 junr03 merged commit 6334a58 into main Dec 24, 2021
@junr03 junr03 deleted the expand-buffer-limit branch December 24, 2021 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants