Lease vs fencing token

A lease gives one runner the right to work for a short time, but a paused runner can still send work later. A fencing token grows with each lease, and the store rejects old tokens. When runner A loses contact for 12 s, a lease passes 100 duplicate jobs and 100 stale writes. Fencing passes none.

Play the level

A lease with a fencing tokenTap to turn the fencing tokens on or off

Fencing tokens · lease 30 s · late write with token 33: rejected

Case 1

Archive jobs: 100 due at 1 s, 10 s each. Check jobs: 20 due at 4 s, 1 s each. Runner A loses lease contact from 2 s to 14 s, but work it already sent can finish.

Case 1
Measure Goal Lease only, 2 s Lease with a fencing token
Duplicates none 100 Fail 0 Pass
Split-brain writes none 100 Fail 0 Pass
Lost writes none 0 Pass 0 Pass
Completion time (Archive) under 18 s 11.02 s Pass 13.92 s Pass
Completion time (Checks) under 8 s 5 s Pass 5 s Pass
Monthly cost 24 USD/mo 24 USD/mo
Error rate 0% 0%
HTTP/2HTTP/2HTTP/2HTTP/2UsersCron schedu…1 vCPU · 1 GBCron schedu…1 vCPU · 1 GBWorker2 vCPU · 4 GB
HTTP/2HTTP/2HTTP/2HTTP/2UsersCron schedu…1 vCPU · 1 GBCron schedu…1 vCPU · 1 GBWorker2 vCPU · 4 GB
Lease only, 2 s: misses a goal
HTTP/2HTTP/2HTTP/2HTTP/2UsersCron schedu…1 vCPU · 1 GBCron schedu…1 vCPU · 1 GBWorker2 vCPU · 4 GB
HTTP/2HTTP/2HTTP/2HTTP/2UsersCron schedu…1 vCPU · 1 GBCron schedu…1 vCPU · 1 GBWorker2 vCPU · 4 GB
Lease with a fencing token: meets the goals