-1

I am planning on implementing Redis cache to improve my SaaS based application in azure. And I am thinking of storing credentials (azure Key/Vault info) in Cache. Currently, I have seperate cosmos DB instance which fetches information for each customer on each request. Which happens to be very expensive in terms of Cosmos DB RUs and Time. To improve performance. I am thinking of storing Azure KeyVault info & other information in Redis cache. So, it improves the app performance.

I am looking for a suggestion, should I implement Redis cache ? or is there a better way to handle this situation ?

e2eDev
  • 301
  • 4
  • 12
  • No, for security reasons you shouldn't be storing secrets from keyvault elsewhere, even in memory-only Redis. Secrets are usually long lived and essentially immutable, so you could cache them in memory in your app if you can guarantee safety. Caching Business and app data from Cosmos in Redis is fine, but performance and cost benefits isn't likely to be massive. Again, small, immutable data can be cached in memory to avoid IO? – StuartLC Apr 29 '22 at 17:26
  • Thanks. Where can i store my Secrets. As there will be a scenario, where it could multiple secrets and those secrets will be deleted and re-created multiple times. Also, when you mention about storing in memory. what does that mean. is it like storing in App's Configuration or something ? – e2eDev Apr 30 '22 at 08:22

1 Answers1

0

Redis is as reliable as you make it, you can setup clusters etc based on your budget really how far you want to take it, with that said saving usernames etc in a cache may or may not be a good idea, if you access redis over a public network and not a service connection or VNET you are opening yourself to possible security challenges but as long as you trust the network between your app and redis this is not a real issue just make sure you dont access it over a public network.

Matt Douhan
  • 677
  • 3
  • 13