skip to Main Content

enter image description here

Given the diagram from Alexu Book of designing Rate-limiter.

I am wondering how the 2 way communication between Redis and rate limiter will take place.

The 2 way communication has been shown using double arrow in the diagram between Redis and middle ware.

Please provide me the steps of interaction

I come to know that it’s not like client-server one way network call. But what are the steps for this 2 way communication and why we need it?

2

Answers


  1. Chosen as BEST ANSWER

    the directional arrow simply represent upstream and downstream.

    The double arrow represents, the interaction between ordered pair of services.

    It acts as upstream for one interaction and downstream for another interaction.


  2. Basically, Redis and rules in cache are the rate limiter.
    The “rate limiter” in the diagram is just a component to ask Redis for numbers and timing, ask the cache what is the rules and calculate what to do with the request.
    It’s a very simple explanation, the system is smarter.

    When the rate limiter decides to let a request pass, it’s need Redis to know about it, so its send an update to Redis.

    Hence, two-way relationship.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search