This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
make the ws buffer size configurable #10013
make the ws buffer size configurable #10013
Changes from 1 commit
0bd9e8e
0d1331d
3f4174a
48c5bc0
1474ea8
ea20a2e
3072b12
46a6d96
311d8b5
c1e4d1b
61ef27c
1563c5d
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a use case for in buffer? We already have
max_rpc_payload
which limits that, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in my case, but I thought it would be cleaner to make both configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it relate to max payload setting? Wouldn't restricting it here further restrict the output max payload?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The buffer seems to be the pre-cursor to the max-payload, at least for the output buffer. I presume you want to have your buffer size be
x
and your max payload size80% of x
in most cases. But now, we allow max payload to be high like 100 MiB (don't ask why, assume some teams that don't care about DOS need it :p), but with a buffer of 10 MiB your max payload is useless.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, perhaps best to detect such misconfiguration and quit with an error then? I think it might be confusing to see large requests fail because they are limited by some other factor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do this if you agree with setting the default buffer size to 16 MiB, with the default max payload remaining 15 MiB. Then I can add a warning if the max out buffer is ever less than max payload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied. I think it is pretty safe, WDYT?