Rest API - Rate Limiting and Throttling
Identify the error in this token bucket refill code snippet:
def refill_tokens(bucket):
bucket.tokens += bucket.refill_rate
if bucket.tokens > bucket.max_tokens:
bucket.tokens = bucket.refill_rateIdentify the error in this token bucket refill code snippet:
def refill_tokens(bucket):
bucket.tokens += bucket.refill_rate
if bucket.tokens > bucket.max_tokens:
bucket.tokens = bucket.refill_rate15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions