Atmora Tech

Meridian Exchange · 2024

Rebuilding Meridian Exchange's bidding engine around per-lot single-writer partitions

Meridian was losing bids to lock contention in the closing seconds of every auction, and disputes over bid order had to be settled manually. We rebuilt the engine around per-lot single-writer partitions and an append-only log, trading cross-lot transactions for provable ordering at 1,800 bids per second.

  • Retail & E-commerce
  • 9 months
  • 7 engineers, 1 designer, 1 delivery lead
1,800 bids/sec
Sustained throughput at auction close
94 ms
p99 bid acknowledgement, down from 6.2 s
0 disputes
Contested bid orderings in 14 months live

The challenge

What was wrong

Meridian's bidding engine wrote every bid into one MySQL table guarded by row locks. In the final 90 seconds of a lot up to 4,000 buyers converge, and lock waits pushed p99 acknowledgement past 6 seconds while bids occasionally landed out of the order they arrived. Auction extension rules lived in application code, so two web nodes could disagree on when a lot actually closed. Buyers disputed around 40 lots a quarter, and each dispute meant re-running the lot by hand.

The approach

What we did

We made each lot a single-writer partition. Bids append to a per-lot log owned by one sequencer process, with partitions assigned through NATS JetStream, so ordering is decided in one place rather than by lock arrival order. Close time became a value written into the log, not a clock read on whichever node served the request. The trade-off is that cross-lot transactions are gone: proxy bids cascading across bundled lots now settle in about 200 ms, and we show that settling state rather than hiding it.

The old engine was fine until it mattered. Atmora spent two weeks reproducing our close-time races before writing a line of code, and we have not had a contested lot since cutover.

Priya RaghunathanChief Technology Officer, Meridian Exchange

Stack

What it runs on

  • Go
  • NATS JetStream
  • PostgreSQL
  • Redis
  • TypeScript
  • React
  • Kubernetes
  • Grafana

Start a project

Tell us what is
breaking.

We reply within one working day, and the first call is with an engineer who would actually work on it — not an account manager. If we are not the right studio for the problem, we will say so on that call.

Start a project