5 Redis Use Cases - Redis Lab

5 Redis Use Cases - Redis Lab
Photo by Kelly Sikkema / Unsplash

So I was seeing a video in youtube about redis use case for a specific scenarios or a system design. So I am writing down my understanding of those use-cases

Learning:

The key redis use-cases are being used in the video

  • Caching
  • Queuing
  • Locking
  • Throttling
  • pubsub’ing

Summary:

They were explaining how they integrated redis in their system in multiple layer as explaining their's system workflow.

  • They cached the db queries in redis.
  • Then when a user requests a query it queues in redis and a consumer consumed the request and start processing for the query.
  • Before starting the query they locked the user request so that his further requests are not being processed by other consumers. If another consumer fails to lock a query(means it is already being locked) they re-queue the query again with fibonacci series seconds.
  • After they get a response from the db they generate the cache for the query and send back the request to redis by publishing(pubsub) it and on the other side the web server was listening(pubsub) for the response in the redis(it started listening right after it made the request to that service). When it gets back the result it responds back to the client.

💡
The original Link can be found here, 5 Redis Use Cases with Gur Dotan
Initially written here in dev.to

Subscribe to nixon1333

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe