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

SendMaxBytes config option #330

Closed
mattrobenolt opened this issue Jul 26, 2022 · 2 comments · Fixed by #341
Closed

SendMaxBytes config option #330

mattrobenolt opened this issue Jul 26, 2022 · 2 comments · Fixed by #341
Labels
enhancement New feature or request

Comments

@mattrobenolt
Copy link
Contributor

mattrobenolt commented Jul 26, 2022

In https://github.com/bufbuild/connect-go/pull/311, a ReadMaxBytes option was added, but to go along with that, when you control both the client and server, an equivalent SendMaxBytes (mostly relevant for the client) to pair with ReadMaxBytes would be nice and prevent sending anything over the wire.

In our case, we configure ReadMaxBytes on the server, and would like to pair this also on our client so if a user attempts to send a message that is too large (and would ultimately be rejected by the server anyways), we can bail early on the client before doing any extra work.

This coincides with the gRPC MaxCallSendMsgSize option.

@mattrobenolt mattrobenolt added the enhancement New feature or request label Jul 26, 2022
@mattrobenolt mattrobenolt changed the title MaxSendBytes config option SendMaxBytes config option Jul 26, 2022
@akshayjshah
Copy link
Member

@pkwarren are you still interested in taking this on? Totally fine if not, but I don't want to keep Matt waiting too long.

@pkwarren
Copy link
Contributor

pkwarren commented Aug 5, 2022

@pkwarren are you still interested in taking this on? Totally fine if not, but I don't want to keep Matt waiting too long.

I've got most of this wired up - should have an update soon.

pkwarren added a commit that referenced this issue Aug 5, 2022
In addition to ReadMaxBytes, add a SendMaxBytes option which will
configure the maximum payload sent by clients or handlers.

Fixes #330.
pkwarren added a commit that referenced this issue Aug 5, 2022
In addition to ReadMaxBytes, add a SendMaxBytes option which will
configure the maximum payload sent by clients or handlers.

Fixes #330.
akshayjshah pushed a commit that referenced this issue Aug 29, 2022
In addition to ReadMaxBytes, add a SendMaxBytes option which will
configure the maximum payload sent by clients or handlers.

Fixes #330.
akshayjshah pushed a commit that referenced this issue Jul 26, 2023
In addition to ReadMaxBytes, add a SendMaxBytes option which will
configure the maximum payload sent by clients or handlers.

Fixes #330.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants