Rest API - Rate Limiting and Throttling
Given this code snippet for per-IP rate limiting:
What is the output?
requests = {"192.168.1.1": 4, "10.0.0.2": 2}
limit = 3
ip = "192.168.1.1"
if requests[ip] > limit:
print("Blocked")
else:
print("Allowed")What is the output?
