← Patterns

Architecture decision record · ADR 009

Partition on event ID, not producer ID

The split path favors failure isolation and balanced load over producer-local ordering that the platform does not guarantee today.

Status: Accepted Date: 2026-08-18 Owner: Platform Supersedes: none

Decision

The dispatcher will compute hash(event.id) mod 2. Even partitions go to ingest-a; odd partitions go to ingest-b.
01

Context

why now

Checkout contributes most of the 1.84M-unit ingestion footprint. Partitioning by producer would preserve producer-local ordering, but it would also place most traffic and most failure exposure on one queue.

The current platform does not promise ordered delivery across events from one producer. Creating that promise inside this change would expand the API contract and make retries harder.

02

Alternatives rejected

criteria

Producer ID

Cheap affinity, but known traffic skew makes one queue dominant and weakens the isolation objective.

Round robin

Balances writes but is not deterministic, complicating retries, replay, and diagnosis.

03

Consequences

accepted

Benefits

  • Dominant producers distribute across both queues.
  • Retries route to the same partition.
  • One queue failure leaves a useful healthy path.

Costs

  • Producer replays must read both queues.
  • Callers cannot infer ordering from queue placement.
  • Runbooks and dashboards must name the partition.

This record becomes immutable once RFC 014 ships. A future ordering guarantee requires a new ADR.