Skip to content

Conversation

@ParkMyCar
Copy link
Contributor

This PR increases the HTTP request body limit from 2MB to 5MiB. The original 2MB limit was picked arbitrarily and it should be safe to bump the limit up.

It also updates an existing test to ensure we'll get logging in prometheus if a request gets rejected for too large of a body.

Motivation

Support larger webhook payloads

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@ParkMyCar ParkMyCar requested a review from a team as a code owner May 30, 2025 16:17

/// Maximum allowed size for a request.
pub const MAX_REQUEST_SIZE: usize = u64_to_usize(2 * bytesize::MB);
pub const MAX_REQUEST_SIZE: usize = u64_to_usize(5 * bytesize::MIB);
Copy link
Contributor

Choose a reason for hiding this comment

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

only concern is switching to mebibytes. is it worth just remaining on megabytes?

Copy link
Contributor

Choose a reason for hiding this comment

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

can we add a comment noting why we use mebibytes? also will need a doc change, I guess?

Copy link
Contributor

@kay-kim kay-kim May 30, 2025

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call out, I updated the docs!

Copy link
Contributor

@ptravers ptravers left a comment

Choose a reason for hiding this comment

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

thought more about it and it makes sense to use base 2 rather than base 10 for a network request. envoy also works on mebi from memory.

@ParkMyCar ParkMyCar merged commit 4497800 into MaterializeInc:main Jun 2, 2025
82 checks passed
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.

3 participants