Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I replace Redis cache with Cosmos DB?

Can i use azure cosmos db instead of redis cache for server side caching , i feel that cosmos Db also provides key value storage, has geo replication , read write access and lower latency than redis cache

like image 969
Sagar Avatar asked Jul 28 '19 19:07

Sagar


People also ask

Does Cosmos DB cache?

The Azure Cosmos DB integrated cache is an in-memory cache that helps you ensure manageable costs and low latency as your request volume grows. The integrated cache is easy to set up and you don't need to spend time writing custom code for cache invalidation or managing backend infrastructure.

Is Redis a cache or DB?

From there, he developed Redis, which is now used as a database, cache, message broker, and queue. Redis delivers sub-millisecond response times, enabling millions of requests per second for real-time applications in industries like gaming, ad-tech, financial services, healthcare, and IoT.

Is Redis the best cache?

Memcached was one of the first popular open source memory caching solutions and works well for basic key value workloads. However, if you are working in the enterprise, or are just looking for a more modern, feature rich and actively developed product, Redis is the best solution.

Is Redis only for cache?

Redis began as a caching database, but it has since evolved into a primary database. Many applications built today use Redis as a primary database. However, most Redis service providers support Redis as a cache but not as a primary database.


1 Answers

Redis is an in-memory datastore hence it's primary use-case is in-memory caching. Since it is a Key-value store, it has generally limited query ability, only allowing queries by primary key.

While, CosmosDB is Globally distributed, horizontally scalable, multi-model database service. It becomes handy in scenarios where you need the ability to query over heterogeneous data.

Those two are totally for different purposes, even Microsoft has redis cache as a service apart from CosmosDB only to serve this purpose.

like image 123
Sajeetharan Avatar answered Oct 10 '22 10:10

Sajeetharan