Coming from a traditional 3 tier webapp background, I am trying to see the best way to implement rate limiting on a microservice that I have running on Docker containers.
Since there could be 3 or 30+ "instances" of this microservice running, I am having trouble figuring out how to limit the number of requests that are coming in short of making shared-state calls (to redis for example) on each incoming request.
I already have a basic rate limiter on the "API gateway" component to protect against a large number of requests but I suppose the microservice should still be in charge of rate limiting based on certain business logic parameters.
How are others implementing this architecture? Are there any blogs or articles to shed more light on this?