High availability, in four ideas
Stateless services run twice. The database runs three times. Agents keep their memory in the database, so any process can die and another one picks up the work.
The layout
Three zones. Lose any one and the other two keep the platform running.
Four kinds of components
Each kind recovers differently.
Gateway, ControlTower, SecondGate, Chat, Agent web/worker/scheduler. One dies, the other serves.
A standby is promoted in ~20 s. No committed data is lost.
Replaced after 30 s. The lock stops two owners at once.
Sandbox runner, search, vectors, Redis, egress proxy. Waits for its node or zone.
How Agents stay available
Processes hold no memory. The database holds every turn, so a process is just a replaceable worker.
They resume from their last saved step.
Each turn has one id; a retry can't start it twice.
Two shards in two zones: a zone loss pauses only one.
When a shard owner's node dies
About 90 seconds from failure to resumed turns, measured in zone-loss drills.
What happens when…
no outage
The other copy serves. Restarts in seconds.
mostly fine
Agents on that node pause ~90 s.
2–3 min
Worst case when the database primary is there. No data lost.
outage
Agent workspaces wait until the node returns.
planned
Full downtime, by design.