Skip to content

fix: lift the Kafka sink record ceiling to 16 MiB - #116

Merged
catinspace-au merged 2 commits into
mainfrom
fix/record-ceiling-and-scaling
Oct 13, 2026
Merged

catinspace-au merged 2 commits into
mainfrom
fix/record-ceiling-and-scaling

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

Vector's Kafka sink dropped any record over 999,872 bytes, on every deployment. The size cap in front of it fell back to librdkafka's own message.max.bytes default of 1,000,000, and the producer we generate set no ceiling either, so a record that got past the cap was refused by librdkafka anyway. Every other stage's producer, and every topic scalo creates, carries 16 MiB.

What changed:

  • The sink's librdkafka options take scalo's MESSAGE_MAX_BYTES (16 MiB) where no layer sets message.max.bytes. The central profile or sink.librdkafka_options still decides it where set, so the value dfe-infra#678 writes on managed Kafka is the ceiling there.
  • The size cap reads the same merged value, so the cap and the producer can't disagree.
  • A record over the ceiling is still held back by the cap and counted once in pipeline_dead_letters_dropped_total{reason="too_large"}. This app has no DLQ (docs/DESIGN.md), and a record over the Kafka ceiling would not fit a Kafka DLQ topic either.
  • scaling is now named in the scalo features. It already arrived through cli-service, and the runtime already writes the scaling_pressure gauge. It reads 0: the supervisor feeds the pressure no components and no memory reading.

Tests:

  • e2e, runs by default because it owns its broker: a default sink carries a 2 MiB record to the next topic, and a record a transform grows past 16 MiB is held back and counted once as too_large. Red on main with Vector's own totals received: 2.0, sent: 0.0, oversize: 2.0 -- the cap held back both records.
  • unit: a default sink writes message.max.bytes: 16777216 and caps at 16777088; a deployment's message.max.bytes (2000000, 8388608) is the ceiling for both the producer and the cap.
  • integration: the running binary exports scaling_pressure as a gauge and /scaling/pressure answers 200. This one passes on main too.
  • the bus template's cap and ceiling are pinned to the generator's.

Refs #115

The size cap in front of Vector's Kafka sink fell back to librdkafka's own message.max.bytes default of 1,000,000 bytes, and the generated producer set no ceiling either, so any record over 999,872 bytes was dropped on every deployment. Every other stage's producer and every topic scalo creates carry 16 MiB.

The sink's librdkafka options now take scalo's MESSAGE_MAX_BYTES where no layer sets message.max.bytes, so a central profile or sink.librdkafka_options still decides it. The size cap reads the same merged value, so the cap and the producer cannot disagree. A record over the ceiling is still held back by the cap and counted once in pipeline_dead_letters_dropped_total{reason="too_large"}.

scalo's scaling feature is now named in Cargo.toml. It already arrived through cli-service, and the runtime already writes the scaling_pressure gauge, which a new test reads off a running binary.

Refs #115
unsafe-libyaml is flagged unmaintained, not vulnerable. It arrives via figment and serde_yaml_ng and parses operator-supplied config YAML only. Tracked in hyperi-io/scalo-rs#341.
@catinspace-au
catinspace-au merged commit 2ddb624 into main Oct 13, 2026
17 checks passed
@catinspace-au
catinspace-au deleted the fix/record-ceiling-and-scaling branch October 13, 2026 06:46
@github-actions

Copy link
Copy Markdown

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.

1 participant