29/32
Part 6 of 6 · Follow-upsLearn
Which clock does a limiter read?
Use the time the request arrived, from a clock that never runs backwards. In Python that's time.monotonic().
The wall clock can jump when the system syncs it, and a sliding log whose times go backwards stops being sorted. Across machines the clocks disagree, so take the time in one place, such as the shared store.