Reputation: 527
My Spring Cloud Gateway acts as a Gateway and has a Circuit Breaker, Time Out Limiter, Retry Mechanism and Rate Limiter
Now if I spin up different instances of the SCG (for a distributed app), would that not create different circuit breaker states? (from what I understand, unlike the rate limiter which is backed up by Redis, the circuit breaker is stored in the local instance memory). How does one get around that, for app scaling?
The timelimiter and retry mechanisms are not a problem, I believe, as they are done on a "per request" basis - so even if I have a few instances of SCG it shouldn't be a problem.
The rate limiter, similarly, is based on several requests over a time window, BUT is backed by redis - so the state of each key is stored there.
But the circuit breaker, based on a time window or several requests, - the state for that is stored locally, as I understand it, so scaling is a problem right? If one wanted to keep track of a single circuit breaker state?
Upvotes: 0
Views: 31