Durability

What Pod keeps when a drive or a whole server fails, and the window of writes a lost server can lose

A sandbox's disk lives in object storage. The server it runs on keeps a cache and a write log, mirrored across two drives, and ships the log to object storage all the time, in small batches.

What failsWhat is lost
One drive of a serverNothing. The other drive carries every write, and the server is drained for repair.
A whole serverThe writes not yet shipped, up to the durability window, and the sandbox's memory. The sandbox starts again on another server from its disk, by itself, and shows restarted: true with reason: server_lost.
A sandbox with a throwaway disk, when its server is lostThe whole disk: a throwaway disk is never sent to object storage.

The durability window

The window is the longest stretch of acknowledged writes that losing a whole server can lose: the writes still in the server's log and not yet in object storage. It is a few seconds by design.

Not published yet

Pod publishes the window here once it is measured.

What to do about it

  • Work that must not be lost goes somewhere outside the sandbox as it happens: a commit pushed, an upload, a database of your own.
  • After a sandbox restarts with reason: server_lost, check the last seconds of work before you go on.