0

I'm trying to create a multi-tenant application and which will be hosted in a single instance. To complete this application I need to implement a Redis cache system. I have two solutions for multi-tenant caching. They are,

  1. I can prefix the keys with tenant name like tenant1:myKey etc
  2. I can use different in-memory DB provided by Redis. I can store different tenant details in different DB. To fetch them connect with the respective DB.

If I go with the second option, is there any disadvantages/performance issue? and if you can suggest any other solutions please help me!!

Note: I don't want to use Redis clustering

Jithin Vijayan
  • 307
  • 5
  • 19
  • [this](https://stackoverflow.com/questions/43244958/why-using-multiple-database-in-same-instance-a-bad-idea-in-redis/43247589#43247589) might be helpful. – for_stack Apr 23 '21 at 00:32
  • Yeah.. I have gone through it. But I couldn't see any serious disadvantages of using multiple databases. https://stackoverflow.com/questions/39192469/how-to-namespace-keys-on-redis-to-avoid-name-collisions/39193262#39193262 also helpful. But I'm not satisfied with these answers because I need little more explanations for the advantages and disadvantages. – Jithin Vijayan May 06 '21 at 16:25

0 Answers0