9/17
Part 4 of 7 · Many serversLearn and do
One bucket per customer, in Redis, changed in one step
Stripe keeps a bucket for every user and implements its limiters on Redis. Reading the bucket, refilling it, checking and writing it back has to happen as one step.
Two servers read the same customer's bucket at the same moment: 1 token left. Each one lets its question through and writes back 0. How many questions got through?
Pick an answer above to see the rest