Skip to content

Commit

Permalink
feat: Reduce the limit for messages in Stream from 50k to 10k. (#2185)
Browse files Browse the repository at this point in the history
Since streams can be oversized by design, there is no check for this
limit that would trigger a staged rollout. It's just that building
streams will respect the new limit henceforth (except the usual
oversizing due to reject responses). Meaning streams with more messages
will just chew through them and not include new messages until they are
below the new limit.

Note that 50k was way higher than anything realistically attainable
considering bottlenecks are elsewhere. Even 10k is still generous.
  • Loading branch information
stiegerc authored Oct 24, 2024
1 parent 35a25ea commit ac6c9d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rs/messaging/src/routing/stream_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const TARGET_STREAM_SIZE_BYTES: usize = 10 * 1024 * 1024;
///
/// At most `MAX_STREAM_MESSAGES` are enqueued into a stream; but only until its
/// `count_bytes()` is greater than or equal to `TARGET_STREAM_SIZE_BYTES`.
const MAX_STREAM_MESSAGES: usize = 50_000;
const MAX_STREAM_MESSAGES: usize = 10_000;

const METRIC_STREAM_MESSAGES: &str = "mr_stream_messages";
const METRIC_STREAM_BYTES: &str = "mr_stream_bytes";
Expand Down

0 comments on commit ac6c9d1

Please sign in to comment.