basalt

EngineeringSeptember 18, 20269 min read

Exactly-once without two-phase commit

Idempotent sinks, epoch fencing and a 64-bit sequence per partition. No coordinator, no stalls.

Jónas Einarsson
Principal engineer, Storage
Exactly-once without two-phase commit

Every connector in Basalt promises exactly-once delivery. For years the textbook answer to that promise has been two-phase commit, and for years it has been the reason streaming systems stall when one participant is slow.

Why we left 2PC behind

A two-phase commit needs every sink to vote before anything is visible. One slow disk in one region holds back every partition in the transaction. At 1.2 million events per second that turns a hiccup into a backlog.

Three small pieces instead

  • Every partition stamps events with a 64-bit sequence that only ever goes up.

  • Sinks are idempotent: writing the same sequence twice is a no-op, so retries are free.

  • Writers hold an epoch. A new writer bumps the epoch and older writers are fenced out on their next write.

Together these give the same guarantee as 2PC without a coordinator. A failed writer is replaced in under a second, and nothing waits for a vote.

Exactly-once is not a protocol. It is a contract between the log and the sink, and the contract can be very small.

What it costs

The sequence adds eight bytes per event and the epoch check adds one comparison per batch. In return, recovery after a node loss dropped from 41 seconds to 0.8 seconds in our chaos tests.

Jónas Einarsson
Principal engineer, Storage
Keep reading

More from the engine room.

How we cut p99 from 11 ms to 4.2 ms
EngineeringSep 24, 2026 · 8 min

How we cut p99 from 11 ms to 4.2 ms

Three changes to the read path in v4.0: declared sort keys, a per-core allocator and a planner that stopped re-sorting partitions at query time.

Time travel is just a really good index
EngineeringSep 4, 2026 · 7 min

Time travel is just a really good index

Why AS OF queries on 30 days of history cost less than one extra replica.

Orbitly deleted 14 pipelines in a quarter
CustomersAug 27, 2026 · 5 min

Orbitly deleted 14 pipelines in a quarter

How a fintech team replaced nightly batch jobs with six materialized views.

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

Create a free website with Framer, the website builder loved by startups, designers and agencies.