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.
Decision
hash(event.id) mod 2. Even partitions go to ingest-a; odd partitions go to ingest-b.Context
why nowCheckout 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.
Alternatives rejected
criteriaProducer 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.
Consequences
acceptedBenefits
- 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.