Rest API - Rate Limiting and Throttling
In a rate limiting system, a developer notices clients are blocked even after waiting the reset time. The code snippet:
What is the likely bug?
if requests >= limit: reject request else: process request requests += 1 if time_passed >= reset_time: requests = 0
What is the likely bug?
