每天进步一点点: AWS DynamoDB中的坑

in #cn5 years ago

最近这段时间对AWS,尤其是它的无服务器架构非常感兴趣。这两天尝试了一下AWS中的非关系型数据库(NoSQL): DynamoDB,感觉到里面有不少坑,最近写的一个应用原型最初的设计是基于DynamoDB的,但进行到后期,感觉因为性能问题完全进行不下去了,又推翻了改成关系型数据库,轻松搞定。下面总结一下:

首先,对于有些应用场景,DynamoDB并不适用。甚至可以说,对于大多数应用场景,DynamoDB都不适用。 如果只是中小型应用的话,能够用关系型数据库解决,就不要考虑DynamoDB了。非要用DynamoDB?你真的想多了。。。

其次,DynamoDB最适合的引用场景就是典型的键/值类型的存储,而且是海量数据的存储。如果你需要进行复杂的查询,还是老老实实的用关系型数据库吧。用DynamoDB的Scan进行复杂的查询,真的是龟速,你还是想多了。。。

还有,使用AWS API对DynamoDB进行读写操作很简单。但是,要把DynamoDB设计好,真的有很多因素需要考虑,你需要想很多。。。

最后,给出在网上看到的一个图表,非常清晰的指出了什么时候才需要考虑使用DynamoDB:

Sort:  

Hi, @aafeng!

You just got a 1.28% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

Congratulations @aafeng! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You distributed more than 41000 upvotes. Your next target is to reach 42000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemitBoard Ranking update - A better rich list comparator
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

STOP

Posted using Partiko Android