Skip to content
Strata
B-01Architecture · B-01

Consistency model

Every transaction is serializable. Hybrid logical clocks order commits across regions, and no read is contradicted by a later one.

FRAT1 · writeSINT2 · readCommit ts 610BeginRead at 540Restart at 640 · sees T1Uncertainty ε ≤ 250 ms02004006008001000HLC ms12
Fig. B-01Two transactions in two regions, ordered by commit timestamp.

Strata runs every transaction at the SERIALIZABLE isolation level. There is no weaker level to opt into by accident: if two transactions could produce a result that no serial order would, one of them is aborted and retried.

Each transaction takes a timestamp from a hybrid logical clock: physical time from the node, plus a logical counter that moves forward whenever the node sees a later timestamp in a message. Clocks across regions are kept within 250 ms of each other. A node that drifts further stops serving and leaves the cluster on its own.

Reading at a timestamp

A read at timestamp t sees every write committed before t and nothing after it. When a read meets an uncommitted write inside its clock-uncertainty window, it waits for that write to resolve or restarts at a later timestamp. No client ever reads a value and then sees an older one.

In SQL

  • BEGIN; … COMMIT; is serializable. READ COMMITTED and REPEATABLE READ are accepted for compatibility and run as SERIALIZABLE.
  • Retry errors use SQLSTATE 40001, the code Postgres uses for serialization failures, so existing retry logic works unchanged.
  • The TypeScript and Go clients retry 40001 for you with jittered backoff, up to five attempts.
Sheet
B-01
Title
Consistency model
Rev
C
Scale
NTS
Date
2026-10-14
B-02Architecture · B-02

Replication

Tables split into ranges. Each range has one consensus log with a copy in every region, and a write commits once three regions have it on disk.

CLIENTLondonFRALeaderOREQuorumVIRQuorumSAOFollowerSINFollowerSYDFollowerCOMMIT150 ms90 ms205 ms160 ms250 msCommit: 3 of 6 hold itOK150 msDashed: catches up after commit
Fig. B-02A write led from Frankfurt, committed with Virginia and Oregon.

Strata splits each table into ranges of about 256 MB by primary key. Every range has a replica in each of the six regions and one leader, placed in the region where most of its writes come from. For a table created WITH (strata.home = 'nearest'), that is the region nearest each row’s writer.

A write goes to the range leader. The leader appends it to its log and sends it to the other five replicas at once. When two of them have written the entry to disk and answered, three regions hold it: the leader commits and replies. The remaining replicas catch up in the background.

Why three

Three copies in three regions means any two regions can be lost without losing a committed write. The leader never waits for the slowest regions. It commits on the first two acknowledgements, which in practice come from its two nearest neighbours.

Commit quorum3 of 6 regions, leader included
Commit wait90 ms from Virginia, 160 ms from Singapore
Range size≈ 256 MB, split and merged automatically
Log entriesChecksummed, flushed to disk before acknowledgement
Sheet
B-02
Title
Replication
Rev
D
Scale
NTS
Date
2026-10-21
B-03Architecture · B-03

Reads from the nearest copy

Followers know exactly how far behind they are. The nearest copy answers a read only when it can answer it correctly.

VIRLeaderSINFollowerNowClosed tsRead at now − 2 sStaleness allowed 2 sLag 0.38 sClient · JakartaAnswered in 14 ms12
Fig. B-03A follower in Singapore serves a read at t − 2 s once its closed timestamp has passed it.

Every replica tracks a closed timestamp: a moment before which it has received every write its leader will ever commit. Leaders advance it every 200 ms and ship it with the log, so a healthy follower trails real time by about one round trip to its leader.

When a query allows staleness, as with SET strata.read_staleness = '2s', the planner picks a timestamp two seconds back and sends the read to the nearest replica whose closed timestamp has passed it. The answer is a consistent snapshot: every row is from the same moment, and nothing committed before that moment is missing.

Reads inside a read-write transaction, and reads that allow no staleness, go to the range leader. For rows homed near their writer, the leader is usually the nearest region anyway.

Sheet
B-03
Title
Reads from the nearest copy
Rev
B
Scale
NTS
Date
2026-09-30
B-04Architecture · B-04

Failover

When a region goes dark its leases expire, four regions elect new leaders, and clients reconnect. The median is 1.8 seconds.

Lease expiryNo renewals from FRAElection4 votes · new leader VIRLog tail catch-upFrom a quorum memberClient reconnectRetry on next nearest900300200400Total, median 1.8 s · 0 writes lostFRA stops answering1First write committed
Fig. B-04Failover after losing Frankfurt, dimensioned in milliseconds.

Leaders hold leases on their ranges. A lease is granted and renewed by four regions and lasts 900 ms. A region that stops answering heartbeats stops renewing, so within 900 ms every lease it held has expired, and nobody else can be granted one before that.

The surviving replicas then elect a new leader for each range. An election needs votes from four regions, and any four regions include at least one of the three that hold each committed write, because 3 + 4 is more than 6. The new leader copies the tail of the log from that region before it accepts writes. That is why no committed write is lost.

Clients see a closed connection, or error 40001 on a transaction in flight. The client library reconnects to the next nearest region and retries. A transaction that never got a commit reply is retried; one that did is already safe in three regions.

Lease expiry900 ms
Election≈ 300 ms, four votes
Log tail catch-up≈ 200 ms
Client reconnect and retry≈ 400 ms
Total, median1.8 s
Total, p993.5 s

Three regions down

With three of six regions down, three remain. That is enough to hold a committed write, but not enough to grant a lease. Strata pauses writes rather than accept one it might not keep. Reads continue from local copies, and every response reports how stale it is. Bring one region back and writes resume.

Sheet
B-04
Title
Failover
Rev
E
Scale
NTS
Date
2026-10-30
B-05Architecture · B-05

Network partitions

If the network splits the cluster, only a side with four or more regions keeps writing. No side accepts a write the other could contradict.

Break line · network partitionOREVIRSAOFRASINSYD4 regions ≥ lease quorum 4Keeps writing · leases held or won in 1.8 s2 regions < 4Writes stop in 900 ms · stale reads1
Fig. B-05A 4 | 2 split: the Americas and Frankfurt against Singapore and Sydney.

A partition is not a failure. Both sides are running, and each believes the other is down. Strata handles it exactly as it handles a failure, with one rule that settles every case: a write lease needs four regions.

Split six regions four against two, and the side with four keeps its leases or wins them within 1.8 seconds. The side with two cannot renew; within 900 ms it stops accepting writes and keeps serving reads, each marked with how old it is.

Split three against three, and neither side has four. Writes pause everywhere until the network heals. It is the one case where a partition stops writes, and it is deliberate: the alternative is two sides accepting writes that cannot both be kept.

  • 4 | 2: the four keep writing; the two serve reads marked stale.
  • 5 | 1: the isolated region stops writing within 900 ms.
  • 3 | 3: writes pause on both sides; reads continue.
  • Healing: the cut-off side catches up from the log. There is nothing to merge.
Sheet
B-05
Title
Network partitions
Rev
B
Scale
NTS
Date
2026-10-07

Want to run the drill on your own workload?

Design partners get a production cluster in the regions they need, and an afternoon with us breaking it on purpose.

Become a design partner