Problem Statement
How does rate limiting differ from a circuit breaker?
Explanation
Limiters bound volume; breakers bound failure cascades. They complement each other: throttle before the dependency, and stop calls when the dependency is unhealthy.
Together they reduce tail latency and protect shared infrastructure.
Code Solution
SolutionRead Only
if(breaker.open()) failFast(); else if(!limiter.allow()) shed();
