The default staleness is the freshness Zanzibar picks for a request that carries no zookie.
Replication happens in Spanner, and Paxos does not wait for all nodes. Of five servers, three persist a write and the write is safe. 2PC requires all nodes to agree.
So the local Spanner can be behind. A request in US West asks for key 1 at a timestamp of a hundred, and the Spanner there holds only 98.
- Zanzibar reads from another zone, such as US East. An out of zone read takes time.
- Zanzibar counts these reads. 10% or 20% of all requests leaving the zone is too many.
- A key whose reads stay in zone is marked safe. Its average staleness, say 300, becomes the default freshness.
- A request without a zookie gets that default. A key three years old is too old, and Zanzibar fetches it from the database.
Confidence intervals and z scores predict whether a read stays in zone. None of this impacts an operation with a zookie.