Token bucket algorithms help prevent retry storms in distributed systems, but a subtle concurrency bug can arise when implementing them in sequential client drivers. Using PlusCal and TLA+, this post models the problem: a sequential thread that awaits token availability creates head-of-line blocking, permanently deadlocking the

5m read timeFrom muratbuffalo.blogspot.com
Post cover image
Table of contents
The Sequential Processing TrapThe Fix: Fail-FastThe Pure TLA+ Perspective

Sort: