Amazon DynamoDB vs RocksDB

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

Amazon DynamoDB

3.7K
3.2K
+ 1
195
RocksDB

136
291
+ 1
11
Add tool

Amazon DynamoDB vs RocksDB: What are the differences?

Introduction

In this article, we will compare Amazon DynamoDB and RocksDB, two popular database systems. We will highlight the key differences between them and provide a brief description of each difference.

  1. Data Model: Amazon DynamoDB is a NoSQL database that supports document, key-value, and wide-column data models. It allows flexible schema design and is suitable for applications that require high scalability. On the other hand, RocksDB is a key-value store database that follows a simple key-value data model. It is optimized for read-heavy workloads and offers high-performance data storage and retrieval.

  2. Data Distribution and Scalability: DynamoDB is a fully managed distributed database that automatically partitions data across multiple servers for high availability and scalability. It transparently handles the distribution of data and workload across these servers. In contrast, RocksDB operates as a single-node database and does not provide built-in mechanisms for data distribution or scaling. It can be used as a component within a larger distributed system.

  3. Consistency Models: DynamoDB offers both strong consistency and eventual consistency models. Strong consistency ensures that all reads reflect the latest write, while eventual consistency allows for faster and more scalable operations at the cost of potential data inconsistency. RocksDB, on the other hand, does not provide built-in support for consistency models. Consistency needs to be implemented at the application level when using RocksDB.

  4. Data Persistence: DynamoDB automatically replicates data across multiple data centers for durability and fault tolerance. It provides a managed service that takes care of data persistence. In contrast, RocksDB is an in-memory database and requires additional measures like write-ahead logs or persistent storage engines to ensure data persistence and durability.

  5. Indexing and Querying: DynamoDB supports secondary indexes, allowing efficient querying of data based on different attributes. It also provides a query language for filtering and sorting data. RocksDB, being a key-value store, does not provide native support for secondary indexes or complex querying. Querying in RocksDB is primarily based on key lookups or range scans.

  6. Transaction Support: DynamoDB supports atomic transactions that provide consistency and isolation guarantees. It allows developers to group multiple operations into a transaction and ensures that they are either all executed or none are. RocksDB, being an embedded database, does not offer built-in transaction support. Transactional behavior needs to be implemented manually by the application when using RocksDB.

In summary, Amazon DynamoDB and RocksDB differ in terms of their data models, data distribution and scalability, consistency models, data persistence, indexing and querying capabilities, and transaction support. DynamoDB provides a managed, scalable, and highly available distributed database service, while RocksDB is optimized for high-performance key-value storage in single-node environments.

Advice on Amazon DynamoDB and RocksDB

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 · 108.1K 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
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Amazon DynamoDB
Pros of RocksDB
  • 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
  • 5
    Very fast
  • 3
    Made by Facebook
  • 2
    Consistent performance
  • 1
    Ability to add logic to the database layer where needed

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon DynamoDB
Cons of RocksDB
  • 4
    Only sequential access for paginate data
  • 1
    Scaling
  • 1
    Document Limit Size
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    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 RocksDB?

    RocksDB is an embeddable persistent key-value store for fast storage. RocksDB can also be the foundation for a client-server database but our current focus is on embedded workloads. RocksDB builds on LevelDB to be scalable to run on servers with many CPU cores, to efficiently use fast storage, to support IO-bound, in-memory and write-once workloads, and to be flexible to allow for innovation.

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

    What companies use Amazon DynamoDB?
    What companies use RocksDB?
    See which teams inside your own company are using Amazon DynamoDB or RocksDB.
    Sign up for StackShare EnterpriseLearn More

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

    What tools integrate with Amazon DynamoDB?
    What tools integrate with RocksDB?

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

    Blog Posts

    Jan 26 2022 at 4:34AM

    Pinterest

    Amazon EC2RocksDBOpenTSDB+3
    3
    724
    GitHubPythonReact+42
    49
    40728
    GitHubPythonNode.js+47
    54
    72324
    GitHubGitSlack+30
    27
    18331
    What are some alternatives to Amazon DynamoDB and RocksDB?
    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