Practical Insights from Datadog’s Use of TLA+ and Simulations
summary
Built a new queue system called Courier backed by FoundationDB with a gRPC broker layer and a sequencer that pushes hot messages to Redis; verification uses TLA+ model checks 5M+ states that prove “no duplicate leases” and “no lost messages” for the core design, but the Redis sequencer model uncovers a liveness gap where receivers can give up before the sequencer runs. Performance study uses a discrete-event simulation in simpai driven by FoundationDB CPU-costs and node-loss scenarios; simulation predicts — and live experiments confirm — throughput collapse near ~60% node loss.
AI-written summary · about
chapters (24)
- 0:00Introduction and background
- 2:27Evolution of Delany system
- 3:29Introducing Courier design
- 5:14Motivation for TLA+ modeling
- 6:17TLA+ model structure
- 7:21Model checking results
- 8:03Benefits of formal modeling
- 9:05TLA+ vs PlusCal comparison
- 9:49Modeling replication bug
- 10:09Limitations of formal methods
- 11:12Quorum failure mode analysis
- 12:16Introduction to simulations
- 13:20Discrete event simulation setup
- 14:23Simulation results analysis
- 15:47Understanding throughput oscillations
- 16:51Simulation validation in production
- 17:12Performance testing challenges
- 18:16Adding Redis sequencer
- 19:19Modeling Redis integration
- 20:24Combining modeling and simulations
- 20:45Development process impact
- 21:27Future with deterministic simulators
- 23:14Go runtime determinism challenges
- 24:16Q&A session
