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

ref(replays): increase chunking limit to 15MB #2032

Merged
merged 11 commits into from
Apr 20, 2023

Conversation

JoshFerge
Copy link
Member

We were previously chunking kafka messages on the replay recording topic to 1 MiB. We are aiming to eliminate this chunking as it requires us to maintain a redis cluster / constrains us to in-order processing. Other infra at Sentry has successfully experimented with larger kafka messages, so we feel this is safe.

With #2031 this should pretty much mean we no longer chunk any messages. We can remove the chunking logic once this is confirmed after deploy.

  • Increase chunking limit from 1MiB to 15 MiB.

We chose 15MiB as the limit, as we're eventually going to combine the replay event with the replay recording, and will want some extra headroom for this in addition to our 10 MiB recording limit.

Depends on ops increasing our kafka payload size limit first.

@JoshFerge JoshFerge requested review from a team and bmckerry April 13, 2023 19:29
// Max message size is 1MB.
let max_message_size = 1000 * 1000;
// Max message size is 15MB.
let max_message_size = 1000 * 150000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be:

Suggested change
let max_message_size = 1000 * 150000;
let max_message_size = 1000 * 15000;

if you want to have 15mb?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also introduce the configuration option for this and not hardcode it?

@JoshFerge JoshFerge force-pushed the jferg/increase-chunking-limit branch 2 times, most recently from 08e0171 to fb5fc3d Compare April 18, 2023 01:54
@JoshFerge JoshFerge requested a review from olksdr April 18, 2023 01:54
relay-config/src/config.rs Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
@@ -47,6 +47,7 @@ Metrics:
- Remove global service registry. ([#2022](https://github.com/getsentry/relay/pull/2022))
- Apply schema validation to all topics in local development. ([#2013](https://github.com/getsentry/relay/pull/2013))
- Lower default max compressed replay recording segment size to 10 MiB. ([#2031](https://github.com/getsentry/relay/pull/2031))
- Increase chunking limit to 15MB for replay recordings. ([#2032](https://github.com/getsentry/relay/pull/2032))
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, merge master in, and move this record to the Unreleased section.

Base automatically changed from jferg/lower-max-replay-limit to master April 19, 2023 17:11
@JoshFerge JoshFerge enabled auto-merge (squash) April 20, 2023 15:31
@JoshFerge JoshFerge merged commit 6e7ed11 into master Apr 20, 2023
@JoshFerge JoshFerge deleted the jferg/increase-chunking-limit branch April 20, 2023 16:04
JoshFerge added a commit to getsentry/sentry that referenced this pull request May 2, 2023
After merging getsentry/relay#2032, we've
observed that we are no longer processing chunked messages (as
intended). We can remove the logic for this as it is no longer used.
JoshFerge added a commit that referenced this pull request Jun 28, 2023
After merging #2032, we can
confirm via our metrics that we no longer hit this logic, as we reject
payloads over 10 MiB and set our chunking limit to 15 MiB.



_#skip-changelog_

Co-authored-by: Tor <tor.saebjoernsen@sentry.io>
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