There are very few suitable use cases for DynamoDB
syslog.ravelin.com
There are very few suitable use cases for DynamoDB
1–10 of 146 posts
Re: There are very few suitable use cases for DynamoDB
#2Re: There are very few suitable use cases for DynamoDB
#3Dynamo does not scale for this specific use case but I have used it successfully in production (at scale) with ZERO issues.
Dynamo is a key value sharded and zero operations* database that most applications and companies will benefit from IMHO.
is the hot key and evenly sending queries to nodes the only issues you concluded we should not use DynamoDB on?
Re: There are very few suitable use cases for DynamoDB
#4When I started building my first app in 2011 MongoDB was the rage. So I build the back-end using the futuristic 'No-SQL' technology. It turned out to be slow (~1 min Query time), inconsistent, and missing an RDBMS layer. Move the thing to PHP/Mysql problems were gone. I still have not found a use case outside of web (comments/discussion) sites where the high integration with Javascript actually makes sense.
Although I dislike MySQL for its many gotchas (data corruption level stuff too!) I was looking for a _long_ _long_ time for a high consistency NoSQL database.. we basically need document storage of large binary data.
Ironically literally nothing in NoSQL land does write-through to disk, they just write to vfs and hope it works; additionally, those that support clustering opt for eventual consistency.. That just baffles my mind, so much potential for lost or corrupted data.
We ended up doing deterministic sharding on postgresql, it worked incredibly well, even in failure modes you hope never to see.. and no corruptions! :D
Re: There are very few suitable use cases for DynamoDB
#5Any DynamoDB tuning advice will say how important it is to have well distributed hash keys. As for the second part, why not use Cloud Spanner? I wish AWS had something like it.
Re: There are very few suitable use cases for DynamoDB
#6What? Why? Suppose that's 5 million customers, you will only have a 10GB table which fits in a single DynamoDB shard, with no sharding. With the restriction of 1-5 operation per customer per second, this sounds like the ideal use case for DynamoDB.
What am I missing?
Re: There are very few suitable use cases for DynamoDB
#7Don't worry. You don't. And there will be many good reasons to refactor the architecture before you do.
Re: There are very few suitable use cases for DynamoDB
#8Fundamentally, the problem seems to be that choosing a partitioning key that's appropriate for DynamoDB's operational properties is ... unlikely. In their own docs on choosing a partition key [1] they use "user ID" as an example of one with good uniformity, but in reality if you choose something like that, you're probably about to be in for a world of pain: in many systems big users can be 7+ orders of magnitude bigger than small users, so what initially looked like a respectable partitioning key turns out to be very lopsided.
As mentioned in the article, you can then try to increase throughput, but you won't have enough control over the newly provisioned capacity to really address the problem. You can massively overprovision, but then you're paying for a lot of capacity that's sitting idle, and even then sometimes it's not enough.
Your best bet is probably to choose a partition key that's perfectly uniformly distributed (like a random ID), but at that point you're designing your product around DynamoDB rather than vice versa, and you should probably wonder why you're not looking at alternatives.
---
[1] http://docs.aws.amazon.com/amazondynamodb/latest/developergu...
Re: There are very few suitable use cases for DynamoDB
#9I don't buy it. I've used BigTable in the past and found it to be infuriating. Now, because it works for him, I'm supposed to believe that BigTable is right for me?
Re: There are very few suitable use cases for DynamoDB
#10The gist of this seems to be that DynamoDB becomes a problem if you have millions of customers. Don't worry. You don't. And there will be many good reasons to refactor the architecture before you do.