Skip to content

Commit

Permalink
Updating DynamoDB comparison (#24216)
Browse files Browse the repository at this point in the history
* updating dynamodb comparison

* minor edits

---------

Co-authored-by: aishwarya24 <ashchakravarthy@gmail.com>
  • Loading branch information
premkumr and aishwarya24 authored Oct 1, 2024
1 parent fa91de7 commit 586d337
Showing 1 changed file with 50 additions and 8 deletions.
58 changes: 50 additions & 8 deletions docs/content/preview/faq/comparisons/amazon-dynamodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,60 @@ menu:
type: docs
---

## Astronomical AWS bills and slow releases
## Architecture

Amazon DynamoDB is a fully-managed NoSQL database offered by Amazon Web Services. While it works very well for smaller scale applications, the limitations it poses in the context of larger scale applications are not well understood.
**YugabyteDB**: A distributed SQL database similar to Google Spanner. It offers strong consistency, [ACID](../../../architecture/key-concepts/#acid) transactions, and supports SQL. It's great for applications that need relational data integrity, complex transactions, hybrid cloud setups, and deployments across multiple regions.

![Amazon DynamoDB Issues](/images/comparisons/amazon-dynamodb-issues.png)
**DynamoDB**: A NoSQL key-value store focused on high performance and scalability. It uses eventual consistency and works well for key-value or document-based data with predictable access patterns. It's often used in web applications, caching, and systems that require large-scale, fast operations.

Our post [11 Things You Wish You Knew Before Starting with DynamoDB](https://www.yugabyte.com/blog/11-things-you-wish-you-knew-before-starting-with-dynamodb/) highlights the above items in better detail.
## SQL compatibility

## YugabyteDB gives 3x agility at 1/10th cost
**YugabyteDB**: Fully compatible with PostgreSQL, allowing you to use familiar SQL queries and tools.

YugabyteDB is an open source [multi-API/multi-model](https://www.yugabyte.com/blog/polyglot-persistence-vs-multi-api-multi-model-which-one-makes-multi-cloud-easy) database with transactional consistency, low latency, and geo-distribution built into the core of a common storage engine. It is Consistent and Partition-tolerant (CP), and provides native support for JSONB, high performance secondary indexes, cloud-native operational ease, and the ability to handle high data density. Not only is it an excellent alternative to Amazon DynamoDB, it also negates the need for a separate RDBMS and cache.
**DynamoDB**: Doesn't support SQL directly and requires learning its own query language.

![Amazon DynamoDB issues](/images/comparisons/yugabyte-db-beats-amazon-dynamodb.png)
## Data model and APIs

Our post [DynamoDB vs MongoDB vs Cassandra for Fast Growing Geo-Distributed Apps](https://www.yugabyte.com/blog/dynamodb-vs-mongodb-vs-cassandra-for-fast-growing-geo-distributed-apps/) further details the differences between YugabyteDB and DynamoDB.
**YugabyteDB**: Supports multiple APIs, including {{<product "ysql">}} (compatible with PostgreSQL) for relational data and {{<product "ycql">}} for wide-column data storage. This gives flexibility in handling different types of data.

**DynamoDB**: A schemaless key-value and document (JSON) database that uses a proprietary API.

## Consistency

**YugabyteDB**: Provides strong consistency with distributed [ACID](../../../architecture/key-concepts#acid) transactions, ensuring data integrity across nodes. {{<product "ysql">}} only supports strong consistency, while {{<product "ycql">}} supports both strong and eventual consistency.

**DynamoDB**: Uses eventual consistency by default, but offers the option for strong consistency on reads. It doesn't provide strong consistency across the board.

## Transactions

**YugabyteDB**: Fully supports distributed [ACID](../../../architecture/key-concepts#acid) transactions across tables, rows, and columns, making it ideal for complex transactional operations. Transactions are consistent across regions and handled efficiently.

**DynamoDB**: Offers limited transaction support. Transactions are only available within a single partition key, making it less ideal for complex transactions. [ACID](../../../architecture/key-concepts#acid) guarantees apply only within the same region, and transactions are capped at 100 items.

## Indexes

**YugabyteDB**: Indexes are globally consistent and updated transactionally. The query optimizer automatically selects the best way to execute queries with or without an index.

**DynamoDB**: Indexes are eventually consistent. Strongly consistent reads are only possible on local indexes, and global indexes support only eventual consistency. Queries or scans must be manually optimized as there is no query optimizer.

## Performance and Scalability

**YugabyteDB**: Built for high performance with low-latency and high throughput. It supports horizontal scaling with auto-sharding for growth.

**DynamoDB**: Optimized for fast, high-volume workloads. It scales well but performance depends on how you configure read/write capacity. Works best for simple key-value tasks but may struggle with complex transactions.

## Deployment Model

**YugabyteDB**: Can be deployed on-premises, in private data centers, or across cloud providers (AWS, GCP, Azure), giving you more control over your setup and costs.

**DynamoDB**: Fully managed by AWS and can only run within their ecosystem, limiting flexibility for hybrid or multi-cloud setups.

## Costs

**YugabyteDB**: Costs depend on your infrastructure if self-hosted or based on usage if managed. It offers better cost control as you can optimize based on your hardware and deployment choices. Being open source, the software itself doesn't have inherent costs.

**DynamoDB**: Costs are based on the number of read and write requests, storage, and optional features like backups. It's cost-effective if your workload is predictable, but on-demand pricing can get expensive with sudden traffic spikes.

## Learn more

- [11 Things You Wish You Knew Before Starting with DynamoDB](https://www.yugabyte.com/blog/11-things-you-wish-you-knew-before-starting-with-dynamodb/)

0 comments on commit 586d337

Please sign in to comment.