Software Alternatives, Accelerators & Startups

Azure Cosmos DB VS Redis

Compare Azure Cosmos DB VS Redis and see what are their differences

Azure Cosmos DB logo Azure Cosmos DB

NoSQL JSON database for rapid, iterative app development.

Redis logo Redis

Redis is an open source in-memory data structure project implementing a distributed, in-memory key-value database with optional durability.
  • Azure Cosmos DB Landing page
    Landing page //
    2023-03-16
  • Redis Landing page
    Landing page //
    2022-10-19

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Azure Cosmos DB features and specs

  • Global Distribution
    Azure Cosmos DB allows for the distribution of data across multiple global regions, enhancing availability and delivering low-latency access to data for users around the world.
  • Multi-Model Support
    It supports multiple data models including document, graph, key-value, and column-family APIs, making it versatile for a variety of applications and use cases.
  • Automatic Scaling
    The database automatically scales up and down to meet the demands of application traffic, helping to manage workloads efficiently without manual intervention.
  • High Throughput and Low Latency
    Cosmos DB offers high performance with single-digit millisecond read and write latencies, ensuring fast access to data for applications.
  • Comprehensive SLAs
    Azure Cosmos DB provides industry-leading SLAs covering availability, throughput, consistency, and latency, offering strong guarantees for customers.
  • Integrated Security
    It includes robust security features such as SSL/TLS encryption, role-based access control, and integration with Azure Active Directory for secure data management.

Possible disadvantages of Azure Cosmos DB

  • Cost
    Azure Cosmos DB can be expensive, especially for high-throughput workloads and global distribution scenarios. Its pricing model based on provisioned throughput (RU/s) can add up quickly.
  • Complexity
    Managing and optimizing Cosmos DB can be complex, requiring a deep understanding of its configuration settings, partitioning strategies, and indexing to achieve optimal performance.
  • Vendor Lock-In
    As a proprietary service, using Cosmos DB tightly couples your application to Azure. This can make it difficult to migrate to other database solutions or cloud providers in the future.
  • Consistency Models
    Azure Cosmos DB supports multiple consistency levels which can introduce complexity in designing applications. Developers need to understand and choose the appropriate consistency level for their specific use case.
  • Limited Native Analytics
    Cosmos DB does not have built-in advanced analytics capabilities. Integrating with other services like Azure Synapse or Databricks may be necessary for sophisticated data analytics and reporting.

Redis features and specs

  • Performance
    Redis is an in-memory data store, which allows it to provide extremely fast read and write operations. This makes it ideal for applications requiring real-time interactions.
  • Data Structures
    Redis offers a variety of data structures, such as strings, hashes, lists, sets, and sorted sets. This flexibility helps developers manage data more efficiently in different scenarios.
  • Scalability
    Redis supports horizontal scalability with features like clustering and partitioning, allowing for easy scaling as your application grows.
  • Persistence
    Though primarily an in-memory store, Redis provides options for data persistence, such as RDB snapshots and AOF logs, enabling data durability across reboots.
  • Pub/Sub Messaging
    Redis includes a built-in publish/subscribe messaging system, which can be used to implement real-time messaging and notifications.
  • Simple API
    Redis has a simple and intuitive API, which can speed up development time and make it easier to integrate Redis into various application stacks.
  • Atomic Operations
    Redis supports atomic operations on data structures, reducing the complexity of concurrent programming and making it easier to maintain data consistency.

Possible disadvantages of Redis

  • Memory Usage
    Being an in-memory data store, Redis can become expensive in terms of memory usage, especially when working with large datasets.
  • Data Persistence Limitations
    While Redis offers data persistence, it is not as robust as traditional databases. There can be data loss in certain configurations, such as when using asynchronous persistence methods.
  • Complexity in Scaling
    Although Redis supports clustering, setting up and managing a Redis cluster can be complex and may require significant DevOps expertise.
  • Single-threaded Nature
    Redis operates on a single-threaded event loop, which can become a bottleneck for certain workloads that could benefit from multi-threading.
  • Limited Query Capabilities
    Compared to traditional relational databases, Redis offers limited querying capabilities. Complex queries and joins are not supported natively.
  • License
    As of Redis 6 and higher, the Redis modules are under the Server Side Public License (SSPL), which may be restrictive for some use cases compared to more permissive open-source licenses.

Azure Cosmos DB videos

Azure Cosmos DB: Comprehensive Overview

More videos:

  • Review - Azure Friday | Azure Cosmos DB with Scott Hanselman
  • Tutorial - Azure Cosmos DB Tutorial | Globally distributed NoSQL database

Redis videos

What is Redis? | Why and When to use Redis? | Tech Primers

More videos:

  • Review - Improve your Redis developer experience with RedisInsight, Redis Labs
  • Review - Redis Labs "Why NoSQL is a Safe Bet"
  • Review - Redis Enterprise Overview with Yiftach Shoolman - Redis Labs
  • Review - Redis system design | Distributed cache System design
  • Review - What is Redis and What Does It Do?
  • Review - Redis Sorted Sets Explained

Category Popularity

0-100% (relative to Azure Cosmos DB and Redis)
Databases
20 20%
80% 80
NoSQL Databases
18 18%
82% 82
Graph Databases
35 35%
65% 65
Key-Value Database
0 0%
100% 100

User comments

Share your experience with using Azure Cosmos DB and Redis. For example, how are they different and which one is better?
Log in or Post with

Reviews

These are some of the external sources and on-site user reviews we've used to compare Azure Cosmos DB and Redis

Azure Cosmos DB Reviews

We have no reviews of Azure Cosmos DB yet.
Be the first one to post

Redis Reviews

Redis Alternative for App Performance | Gigaspaces
Redis offers a RESTful API for accessing data stored within its in-memory technology data structures. This API provides a simple and efficient way to interact with Redis, enabling developers to leverage its capabilities seamlessly in their applications. Developers also need to manage the Redis cached data lifecycle, it’s the application responsibility to store the data &...
Are Free, Open-Source Message Queues Right For You?
A notable challenge with Redis Streams is that it doesn't natively support distributed, horizontal scaling. Also, while Redis is famous for its speed and simplicity, managing and scaling a Redis installation may be complex for some users, particularly for persistent data workloads.
Source: blog.iron.io
Redis vs. KeyDB vs. Dragonfly vs. Skytable | Hacker News
1. Redis: I'll start with Redis which I'd like to call the "original" key/value store (after memcached) because it is the oldest and most widely used of all. Being a long-time follower of Redis, I do know it's single-threaded (and uses io-threads since 6.0) and hence it achieves lesser throughput than the other stores listed above which are multi-threaded, at least to some...
Memcached vs Redis - More Different Than You Would Expect
Remember when I wrote about how Redis was using malloc to assign memory? I lied. While Redis did use malloc at some point, these days Redis actually uses jemalloc. The reason for this is that jemalloc, while having lower peak performance has lower memory fragmentation helping to solve the framented memory issues that Redis experiences.
Top 15 Kafka Alternatives Popular In 2021
Redis is a known, open-source, in-memory data structure store that offers different data structures like lists, strings, hashes, sets, bitmaps, streams, geospatial indexes, etc. It is best utilized as a cache, memory broker, and cache. It has optional durability and inbuilt replication potential. It offers a great deal of availability through Redis Sentinel and Redis Cluster.

Social recommendations and mentions

Based on our record, Redis seems to be a lot more popular than Azure Cosmos DB. While we know about 214 links to Redis, we've tracked only 9 mentions of Azure Cosmos DB. We are tracking product recommendations and mentions on various public social media platforms and blogs. They can help you identify which product is more popular and what people think of it.

Azure Cosmos DB mentions (9)

  • Blazor server app, deployment options
    If you are writing the code maybe consider learning Cosmos DB it’s pretty easy to work with and there is a free tier. Also in my experience it’s much faster than a SQL database. Source: almost 2 years ago
  • Infrastructure as code (IaC) for Java-based apps on Azure
    Sometimes you don’t need an entire Java-based microservice. You can build serverless APIs with the help of Azure Functions. For example, Azure functions have a bunch of built-in connectors like Azure Event Hubs to process event-driven Java code and send the data to Azure Cosmos DB in real-time. FedEx and UBS projects are great examples of real-time, event-driven Java. I also recommend you to go through 👉 Code,... - Source: dev.to / over 2 years ago
  • Deploying a Mostly Serverless Website on GCP
    When debating the database solution for our application we were really seeking for a scalable serverless database that wouldn’t bill us for idle time. Options like AWS Athena, AWS Aurora Serverless, and Azure Cosmos DB immediately came to mind. We believed that GCP would have a comparable service, yet we could not find one. Even after consulting the GCP cloud service comparison documentation we were still unable... - Source: dev.to / almost 3 years ago
  • Which DB to use for API published on Azure?
    If you are looking for one to start with; you can try Cosmos: https://azure.microsoft.com/en-us/services/cosmos-db/. Source: about 3 years ago
  • Basic Setup for Azure Cosmos DB and Example Node App
    I have had an opportunity to work on a project that uses Azure Cosmos DB with the MongDB API as the backend database. I wanted to spend a little more time on my own understanding how to perform basic setup and a simple set of CRUD operations from a Node application, as well as construct an easy-to-follow procedure for other developers. - Source: dev.to / about 3 years ago
View more

Redis mentions (214)

  • RisingWave Turns Four: Our Journey Beyond Democratizing Stream Processing
    Real-time serving: Many push processed data into low-latency serving layers like Redis to power applications needing instant responses (think fraud detection, live recommendations, financial dashboards). - Source: dev.to / 13 days ago
  • Setup a Redis Cluster using Redis Stack
    Redis® Cluster is a fully distributed implementation with automated sharding capabilities (horizontal scaling capabilities), designed for high performance and linear scaling up to 1000 nodes. . - Source: dev.to / about 1 month ago
  • Modern Web Development Sucks? How PostgreSQL Can Replace Your Tech Stack
    Instead of spinning up Redis, use an unlogged table in PostgreSQL for fast, ephemeral storage. - Source: dev.to / about 2 months ago
  • How to Increase API Performance
    Caching helps minimize backend strain, reduce delays, and handle more requests, which translates to better scalability, smoother user interactions, and smarter resource use. Tools like Redis and Varnish have shown impressive results in high-demand API setups [1]. - Source: dev.to / 2 months ago
  • Consuming paginated API using periodic Celery task in a Django Application
    We are using redis as our broker. You can opt for RabbitMQ which is supported out-of-box by celery. - Source: dev.to / 3 months ago
View more

What are some alternatives?

When comparing Azure Cosmos DB and Redis, you can also consider the following products

ArangoDB - A distributed open-source database with a flexible data model for documents, graphs, and key-values.

MongoDB - MongoDB (from "humongous") is a scalable, high-performance NoSQL database.

neo4j - Meet Neo4j: The graph database platform powering today's mission-critical enterprise applications, including artificial intelligence, fraud detection and recommendations.

Apache Cassandra - The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance.

OrientDB - OrientDB - The World's First Distributed Multi-Model NoSQL Database with a Graph Database Engine.

memcached - High-performance, distributed memory object caching system