Rest API - Rate Limiting and Throttling
Consider this pseudocode for per-user rate limiting:
What will be printed?
requests = {"alice": 2, "bob": 5}
limit = 5
user = "bob"
if requests[user] >= limit:
print("Limit reached")
else:
print("Request allowed")What will be printed?
