AWS MySQL RDS vs AWS DynamoDB

I use MySQL for a fair time, and I like its structure and SQL queries, etc.

Currently building a new system in AWS, and I'm looking at DynamoDB. Currently I know a little about it.

Is another better?

What is the advantage of DynamoDB?

what is a transition, for example, from MySQL queries, etc. to this flat DB style?

+51
database mysql amazon-web-services amazon-dynamodb
Dec 20 '12 at 6:17
source share
4 answers

You can read the AWS explanation about this here .

In short, if you have mostly Lookup queries (rather than joining queries), it is better to use DynamoDB (and another NoSQL database). If you need to process a lot of data , you will be limited when using MySQL (and other DBMSs).

You cannot reuse your MySQL queries or data schema, but if you take the trouble to learn NoSQL, you will add an important tool to your toolbox. There are many cases where DynamoDB provides the simplest solution.

+28
Dec 20 '12 at 15:25
source share

Indeed, DynamoDB and MySQL are apples and oranges. DynamoDB is the NoSQL storage tier, while MySQL is used for relational storage. You must choose what to use based on the real needs of your application. In fact, some applications may be well served using both.

If, for example, you store data that does not lend itself to a relational scheme (tree structures, JSON representations without a scheme, etc.) that can be searched against a single key or combination of keys / ranges, then DynamoDB (or some other NoSQL store) will probably be your best bet.

If you have a well-defined schema for your data that can fit well with the relational structure, and you need the flexibility to query the data in different ways (adding indexes, if necessary, of course), then RDS may be the best solution.

The main advantage of using DynamoDB as a NoSQL store is that you get guaranteed read / write bandwidth at any level you need without worrying about managing the storage of clustered data. Therefore, if your application requires 1000 read / write operations per second, you can simply provide a DynamoDB table for this bandwidth level and not worry about the underlying infrastructure.

RDS has the same benefit as not having to worry about the infrastructure itself, however, if you need to make a significant number of records before the moment when the largest instance size will no longer support, you are kind on the left with no parameters (you can scale horizontally for reading using read replicas).

Updated note: DynamoDb now supports global secondary indexing, so you now have the opportunity to perform optimized searches on data fields other than a hash or a combination of hashes and range keys.

+126
Dec 20 '12 at 16:33
source share

We simply migrated all of our DynamoDB tables to MySQL RDS.

While using DynamoDB for specific tasks might make sense, building a new system on top of DynamoDB is a really bad idea. Best plans, etc., you always need extra flexibility from your database.

Here are our reasons why we switched from DynamoDB:

  • Indexing. Changing or adding keys on the fly is not possible without creating a new table.
  • Requests Data requests are extremely limited. Especially if you want to request non-indexed data. Matches are, of course, impossible, so you need to manage complex data relationships at your code / cache level.
  • Backup - such a tedious backup procedure is a disappointing surprise compared to a smooth RDS backup
  • GUI - poor UX, limited search, no fun.
  • Speed ​​- Response time is problematic compared to RDS. You find that you are building a sophisticated caching mechanism to compensate for the places you would set for internal RDS caching.
  • Data integrity. Although the concept of a fluid data structure seems nice to start with, some of your data is better "set in stone." Strong typing is a blessing when a small mistake tries to destroy your database. With DynamoDB, anything is possible and really everything that can go wrong does.

Now we are using DynamoDB as a backup for some systems, and I am sure that we will use it in the future for specific, well-defined tasks. This is not a bad database, it is simply not a database to service 100% of your main system.

As for the benefits, I would say scalability and durability. It scales incredibly and transparently, and it (kind of) is always up. These are really great features, but they in no way compensate for the flaws.

+84
Jul 30 '13 at 7:46
source share

When using DynamoDB, you should also be aware that members / records in DynamoDB are limited to 400 KB (see DynamoDB Limitations ). For many use cases this will not work. Therefore, DynamoDB will be good for a few things, but not for everyone. The same goes for many other NoSQL databases.

+4
Jan 29 '13 at 9:14
source share



All Articles