Need advice about which tool to choose?Ask the StackShare community!

Amazon DynamoDB

3.7K
3.2K
+ 1
195
Redis

59.4K
45.7K
+ 1
3.9K
Add tool

Amazon DynamoDB vs Redis: What are the differences?

Introduction:

Amazon DynamoDB and Redis are both popular NoSQL databases used for different purposes. DynamoDB is a fully managed, highly scalable, and serverless NoSQL database service offered by Amazon Web Services (AWS). On the other hand, Redis is an open-source in-memory data structure store that can be used as a caching layer or as a persistent database.

  1. Data Structure: One key difference between DynamoDB and Redis is their data structure. DynamoDB is a key-value store where data is stored and accessed using primary keys. It supports both single-item and batch operations on items, and each item can have a flexible schema. In contrast, Redis is not just a key-value store but also a data structure store. It supports various data structures like strings, lists, sets, sorted sets, and hashes, allowing for more complex data manipulation and operations.

  2. Scalability: Another significant difference between DynamoDB and Redis is how they handle scalability. DynamoDB is designed to scale automatically with the demands of the application. It can handle millions of requests per second and automatically partitions data across multiple servers. Additionally, DynamoDB offers different models for scaling, including on-demand and provisioned capacity modes. Redis, on the other hand, requires manual configuration for achieving scalability. It can be deployed in a clustered configuration to distribute data across multiple Redis instances, but it does not have built-in automatic scaling like DynamoDB.

  3. Persistence: Persistence refers to the ability to store data permanently even after a system restart. In DynamoDB, data is stored durably and automatically replicated across multiple availability zones to ensure high availability and durability. DynamoDB is designed to be a fully managed and highly available service. Redis, by default, stores data in memory and persists it to disk periodically. However, Redis also provides options for different persistence modes, including RDB (snapshotting) and AOF (append-only file), which offer different levels of persistence.

  4. Querying: DynamoDB and Redis differ in their query capabilities. DynamoDB allows querying based on the primary key, including both simple and composite keys. It also supports querying by secondary indexes for more flexible access patterns. However, DynamoDB does not provide full-text search capabilities out of the box. On the other hand, Redis supports various query mechanisms, including simple key-based lookup and more advanced operations like pattern matching, range queries, and full-text search using external modules like RediSearch.

  5. Caching: Both DynamoDB and Redis can be used as caching layers, but they have different approaches to caching. DynamoDB provides an in-memory caching feature called DynamoDB Accelerator (DAX), which sits between the application and DynamoDB and provides low-latency responses for frequently accessed data. Redis, being an in-memory data store, is often used as a dedicated caching layer due to its high performance and support for advanced caching mechanisms like expiration policies, eviction strategies, and cache invalidation.

  6. Transaction Support: When it comes to transaction support, DynamoDB and Redis differ significantly. DynamoDB offers support for ACID (Atomicity, Consistency, Isolation, Durability) transactions, allowing multiple related operations to be grouped into a single transaction and ensuring data consistency and integrity. Redis, on the other hand, did not have built-in transaction support until the introduction of Redis 6.0. With Redis 6.0, atomicity can be achieved using the MULTI, EXEC, and WATCH commands, but it does not provide full ACID compliance.

In Summary, Amazon DynamoDB and Redis differ in their data structure, scalability models, persistence mechanisms, querying capabilities, caching approaches, and transaction support. These differences make them suitable for different use cases and emphasize their strengths in specific areas.

Advice on Amazon DynamoDB and Redis

We are building a social media app, where users will post images, like their post, and make friends based on their interest. We are currently using Cloud Firestore and Firebase Realtime Database. We are looking for another database like Amazon DynamoDB; how much this decision can be efficient in terms of pricing and overhead?

See more
Replies (1)
William Frank
Data Science and Engineering at GeistM · | 2 upvotes · 112.8K views
Recommends

Hi, Akash,

I wouldn't make this decision without lots more information. Cloud Firestore has a much richer metamodel (document-oriented) than Dynamo (key-value), and Dynamo seems to be particularly restrictive. That is why it is so fast. There are many needs in most applications to get lightning access to the members of a set, one set at a time. Dynamo DB is a great choice. But, social media applications generally need to be able to make long traverses across a graph. While you can make almost any metamodel act like another one, with your own custom layers on top of it, or just by writing a lot more code, it's a long way around to do that with simple key-value sets. It's hard enough to traverse across networks of collections in a document-oriented database. So, if you are moving, I think a graph-oriented database like Amazon Neptune, or, if you might want built-in reasoning, Allegro or Ontotext, would take the least programming, which is where the most cost and bugs can be avoided. Also, managed systems are also less costly in terms of people's time and system errors. It's easier to measure the costs of managed systems, so they are often seen as more costly.

See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Amazon DynamoDB
Pros of Redis
  • 62
    Predictable performance and cost
  • 56
    Scalable
  • 35
    Native JSON Support
  • 21
    AWS Free Tier
  • 7
    Fast
  • 3
    No sql
  • 3
    To store data
  • 2
    Serverless
  • 2
    No Stored procedures is GOOD
  • 1
    ORM with DynamoDBMapper
  • 1
    Elastic Scalability using on-demand mode
  • 1
    Elastic Scalability using autoscaling
  • 1
    DynamoDB Stream
  • 886
    Performance
  • 542
    Super fast
  • 513
    Ease of use
  • 444
    In-memory cache
  • 324
    Advanced key-value cache
  • 194
    Open source
  • 182
    Easy to deploy
  • 164
    Stable
  • 155
    Free
  • 121
    Fast
  • 42
    High-Performance
  • 40
    High Availability
  • 35
    Data Structures
  • 32
    Very Scalable
  • 24
    Replication
  • 22
    Great community
  • 22
    Pub/Sub
  • 19
    "NoSQL" key-value data store
  • 16
    Hashes
  • 13
    Sets
  • 11
    Sorted Sets
  • 10
    NoSQL
  • 10
    Lists
  • 9
    Async replication
  • 9
    BSD licensed
  • 8
    Bitmaps
  • 8
    Integrates super easy with Sidekiq for Rails background
  • 7
    Keys with a limited time-to-live
  • 7
    Open Source
  • 6
    Lua scripting
  • 6
    Strings
  • 5
    Awesomeness for Free
  • 5
    Hyperloglogs
  • 4
    Transactions
  • 4
    Outstanding performance
  • 4
    Runs server side LUA
  • 4
    LRU eviction of keys
  • 4
    Feature Rich
  • 4
    Written in ANSI C
  • 4
    Networked
  • 3
    Data structure server
  • 3
    Performance & ease of use
  • 2
    Dont save data if no subscribers are found
  • 2
    Automatic failover
  • 2
    Easy to use
  • 2
    Temporarily kept on disk
  • 2
    Scalable
  • 2
    Existing Laravel Integration
  • 2
    Channels concept
  • 2
    Object [key/value] size each 500 MB
  • 2
    Simple

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon DynamoDB
Cons of Redis
  • 4
    Only sequential access for paginate data
  • 1
    Scaling
  • 1
    Document Limit Size
  • 15
    Cannot query objects directly
  • 3
    No secondary indexes for non-numeric data types
  • 1
    No WAL

Sign up to add or upvote consMake informed product decisions

What is Amazon DynamoDB?

With it , you can offload the administrative burden of operating and scaling a highly available distributed database cluster, while paying a low price for only what you use.

What is Redis?

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.

Need advice about which tool to choose?Ask the StackShare community!

Jobs that mention Amazon DynamoDB and Redis as a desired skillset
LaunchDarkly
Oakland, California, United States
What companies use Amazon DynamoDB?
What companies use Redis?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Amazon DynamoDB?
What tools integrate with Redis?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Nov 20 2019 at 3:38AM

OneSignal

PostgreSQLRedisRuby+8
9
4729
Jun 6 2019 at 5:11PM

AppSignal

RedisRubyKafka+9
15
1703
GitHubDockerReact+17
41
37343
What are some alternatives to Amazon DynamoDB and Redis?
Google Cloud Datastore
Use a managed, NoSQL, schemaless database for storing non-relational data. Cloud Datastore automatically scales as you need it and supports transactions as well as robust, SQL-like queries.
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
Amazon SimpleDB
Developers simply store and query data items via web services requests and Amazon SimpleDB does the rest. Behind the scenes, Amazon SimpleDB creates and manages multiple geographically distributed replicas of your data automatically to enable high availability and data durability. Amazon SimpleDB provides a simple web services interface to create and store multiple data sets, query your data easily, and return the results. Your data is automatically indexed, making it easy to quickly find the information that you need. There is no need to pre-define a schema or change a schema if new data is added later. And scale-out is as simple as creating new domains, rather than building out new servers.
MySQL
The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
Amazon S3
Amazon Simple Storage Service provides a fully redundant data storage infrastructure for storing and retrieving any amount of data, at any time, from anywhere on the web
See all alternatives