Grokking Redis
0% completed
9.8 Quotas, Cost Guards, and Provider Limits
A tenant can stay under its per-minute limit all day and still use far more than its plan includes. At acme's 300,000 TPM, a full day of steady traffic is 300,000 x 1,440 minutes = 432 million tokens, while the Pro plan includes 5 million tokens per day. The previous lesson built the per-minute side for acme: a token bucket in a Lua script that reserves input plus max_tokens and refunds the unused part after the provider reports actual usage, and a sorted set that caps the requests in progress.
This lesson covers the limits that work over longer periods and across tenants
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%