Skip to content

Bump AWS_EVENT_STREAM_MAX_MESSAGE_SIZE to 256MB #122

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

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Conversation

waahm7
Copy link
Contributor

@waahm7 waahm7 commented Feb 10, 2025

Description of changes:

  • Some services have bumped the limit from 16 MB to 24 MB for the event stream message. Internally, it was discussed that we should not do any client-side validation for the message size and let the server handle it because this limit is subject to change in the future.

We will bump the limit to 256 MB, which is a reasonably high limit.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@waahm7 waahm7 merged commit 4bd476b into main Feb 10, 2025
35 checks passed
@waahm7 waahm7 deleted the bump-message-limit branch February 10, 2025 21:45
graebm added a commit that referenced this pull request Feb 13, 2025
*Issue:*

The [previous PR](#122) increased MAX_MESSAGE_SIZE from 16MiB -> 256MiB because some services were bumping into this limit. This is lower that its actual technical max of INT32_MAX (2GiB+), but it seemed like there should still have **some** reasonable value.

MAX_HEADERS_SIZE is a similar constant, set lower than its actual technical limit of INT32_MAX (2GiB+), and was not adjusted in the previous PR

*Description of changes:*

* Set MAX_HEADERS_SIZE equal to MAX_MESSAGE_SIZE
  * Yes, it's silly for a message to be 100% headers, but 🤷‍♀️
* Document how many bytes are used to encode these things, so we know which constants can be bumped higher or not.
* Add image and text to Readme (copied [Transcribe docs](https://docs.aws.amazon.com/transcribe/latest/dg/streaming-setting-up.html)) the explains the encoding (I always need to look this up myself)
* Remove ~AWS_EVENT_STREAM_HEADER_STATIC_VALUE_LEN_MAX~, a value that is only used once internally, and whose existence can only serve to confuse users of this library
* Add AWS_EVENT_STREAM_HEADER_VALUE_LEN_MAX, because that is an actual technical limit a user might be interested in
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