A Token Bucket Is Two Variables
What actually decides whether a request is allowed or throttled, and why does that decision need no queue, no timer, and no scheduler?
Open Session 01Protocol in Code · Track
token buckets, lazy refill, and hierarchical class trees as shaping math
Sessions
What actually decides whether a request is allowed or throttled, and why does that decision need no queue, no timer, and no scheduler?
Open Session 01If nothing is ticking a clock in the background, when does a token bucket's balance actually get updated, and why is the math split into its own file with no bucket object in sight?
Open Session 02A leaky bucket uses the same two variables and the same lazy-settlement trick as a token bucket — so why does an identical burst that a token bucket allows outright get dropped by a leaky bucket?
Open Session 03Hierarchical shaping puts classes like "video" and "bulk" underneath "default" so they can share what "default" doesn't use — but a parent pointer alone doesn't make that sharing safe. What has to be true of the tree before any borrowing math is trustworthy, and how much can a class actually borrow on paper?
Open Session 04Four sessions built four standalone mechanisms — a token bucket that refills itself, the lazy refill math underneath it, a leaky bucket that drains itself, and a class tree that validates its own shape. None of them, alone, shapes traffic. What does it take to wire them into something that classifies a packet and decides its fate, and what exactly is it about that wiring that keeps one class's exhaustion from leaking into another's?
Open Session 05