Build a rate limiter as running code
Filed under PhonePe
The question
Define a RateLimiter interface with an allow(clientId) method and implement a token bucket rate limiter tracking per-client tokens and timestamps, ensuring thread-safe operations in a concurrent environment.
No write-up yet. Related questions below have one.
Related PhonePe questions
Collected from public candidate posts and coding forums. Updated Nov 2026.