Token Bucket Rate Limiter (Java Code Review)
Review a buggy Java implementation of a rate limiter using the Token Bucket algorithm, where tokens are refreshed at a fixed rate. Identify the bugs and rewrite the implementation correctly.
Asked at:
Cloudflare
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late July, 2026
Cloudflare
Senior
A basic implementation of Rate Limiter using Token Bucket (tokens getting refreshed at fixed rate) was given and asked to review & find bug. Apart from reviewing code, expectation was to fully rewrite the working code as well.
Your account is free and you can post anonymously if you choose.