3 ms·
I love DynamoDB for a lot of things, but as a store for objects much larger than 1KiB it's not very cost-effective. DynamoDB writes are priced per WCU. A WCU
by kondro 5y ago
I love DynamoDB for a lot of things, but as a store for objects much larger than 1KiB it's not very cost-effective.
DynamoDB writes are priced per WCU.
A WCU will give you 1KiB written to the DB.
In On Demand, WCUs cost you (depending on region) $1.25/million writes. For Provisioned capacity, you pay about 1/7th that (but need to deal with keeping the Provisioned capacity and auto-scaler at the correct level, so in practice you can maybe get this to about 25-35% the On Demand rate when you know what your usage looks like, with further discounts for actually reserving capacity).
If you're writing 32KiB objects, this uses 32x WCU ($40/million writes) and if these objects are even updated (e.g. to change a status or similar), the update writes the entire object again.
On a performance/architecture note, DynamoDB has a hard per-partition limit of 1,000 WCU (per second). Writing larger objects can very quickly get you to these limits which increase your architectural complexity by requiring you to shard access.
Although, in practice you'd never write large objects to DDB. S3 is _only_ $5/million writes (and $0.023/GB/month vs $0.25/GB/month for DDB). If you're writing even 3+ KB (especially if you expect to need to update an item in the future) it's usually more cost effective to store these blobs in S3.
But either way, you're still going to be paying at least $5/million write requests. For multi-MB blobs, this is a non-issue. But for a K/V store of smallish objects, I think it's pretty expensive.
- londons_explore 5y agoI really want to not need to care about object sizes. Whether I'm writing 1 byte or 1 gigabyte, I want to have the same semantics, same API, and same sane billing model. The underlying tech can differ depending on object size, but as a user, I want it to all transparently look like one unified store.
- kondro 5y agoMe too… but I don't think anything really does this. _Maybe_ Firebase Store for certain scenarios, but it has its own tradeoffs too.
- manigandham 5y agoThat's what object stores are.