Encoding Sortable Binary Database Keys
When building applications that need to store hierarchical data efficiently, developers often reach for patterns like DynamoDBβs single-table design, where you organize data into grouped, sortable lis...
Encoding database keys so they sort correctly turns out to be trickier than you might think. We designed a special format that keeps numbers sorted as strings.
These are the sort of edge cases we solve to make it easier to build single-table data models.
stately.cloud/blog/encodin...
26.08.2025 19:51
π 0
π 0
π¬ 0
π 0
What do you think? Using a SQL database with those magic design patterns (no foreign keys, no joins, JSON documents). This slide is from Canva at #AWSreInvent keynote
π€ Why not using a document database then?
05.12.2024 17:50
π 4
π 1
π¬ 2
π 0
Reducing DynamoDB read costs by 60% using Sync
As a NoSQL database, StatelyDB exposes all the classic CRUD APIs youβre used to - Put, Get, Delete, and List. But thereβs one other core API that we think is a game changer - SyncList. To explain why ...
What's the best way to reduce cloud costs? Stop doing unnecessary work! I cut read costs for my application by 60% by syncing data instead of reloading it all. This is such a common and effective pattern that it was one of the first things we built into StatelyDB.
stately.cloud/blog/reducin...
21.04.2025 17:09
π 0
π 1
π¬ 0
π 0
No, for example if you have a temp volume mounted for some shared (ephemeral) state between pods, it thinks the pod isn't safe to remove ever. You have to add the 'cluster-autoscaler.kubernetes.io/safe-to-evict: "true"' annotation.
24.02.2025 19:50
π 0
π 0
π¬ 0
π 0
Oh, totally, but that's why it's autoscaling. Having someone turn a knob manually is a bad idea.
17.02.2025 22:32
π 0
π 0
π¬ 0
π 0
A screenshot of the paper "Amazon DynamoDB: A Scalable, Predictably Performant, and Fully Managed NoSQL Database Service"
https://www.usenix.org/conference/atc22/presentation/elhemali
Figure 1 from the paper: DynamoDB timeline.
A good read on how DynamoDB has evolved over the past decade. DynamoDB was originally launched in 2012, and this retrospective paper was published in 2022. www.usenix.org/conference/a...
Some takeaways after reading it π§΅
09.02.2025 19:33
π 36
π 9
π¬ 1
π 0
That graph is after the 50% cost cut. Before it wasnβt even a contest.
Even in your example autoscaling helps - it will scale up during events and down when theyβre not running. The only downside is you canβt scale all the way to zero, but you can scale to 1.
10.02.2025 16:45
π 0
π 0
π¬ 1
π 0
Don't forget to document all the reasons it *won't* evict pods even when you want it to...
09.02.2025 00:29
π 2
π 0
π¬ 1
π 0
Easy pagination is lowkey one of the best things about DynamoDB
06.02.2025 18:59
π 1
π 0
π¬ 1
π 0
Data modeling in DynamoDB is awkward.
DynamoDB provides an incredible set of no-frills features for building apps and services. It has consistent performance at any scale. Very low operational pain. Simple cost model. Missing from that li...
DynamoDB is great for consistent performance, but getting started on it (or changing anything afterwards) can be difficult. What if it was easier to model your data in a way that sets you up for success and lets you sleep through the night?
stately.cloud/blog/data-mo...
06.02.2025 18:56
π 0
π 0
π¬ 0
π 0
And that's just writes - for reads provisioned capacity is still 50% the cost of on-demand.
06.02.2025 18:27
π 0
π 0
π¬ 1
π 0
That's fair, but provisioned capacity autoscaling is similarly set it and forget it.
What I'm amazed at is that even relatively "spiky" loads are cheaper with autoscaled provisioned capacity. In this graph yellow is the on-demand dollar cost, while the red is provisioned capacity cost.
06.02.2025 18:26
π 0
π 0
π¬ 1
π 0
DIM's been doing great since switching from Postgres to StatelyDB - costs are down and it's rock solid. I have a followup post coming soon that takes the wins even further.
04.02.2025 18:03
π 1
π 0
π¬ 0
π 0
I use a slightly different version saved as `~/bin/git-delete-merged-branches` so I can run it with "git delete-merged-branches":
#!/bin/sh
git branch --merged | grep -v "\*" | grep -v "^\s*\(master\|main\)$" | xargs -n 1 git branch -d
The `git branch --merged` is the most important bit.
04.02.2025 17:59
π 1
π 0
π¬ 1
π 0
They mention it briefly but a big gotcha is that the default hop limit for IMDSv2 is 1, but containers running in Kubernetes need it to be 2. So you must use a custom launch template in EKS to be able to use it at all.
26.01.2025 21:32
π 2
π 0
π¬ 0
π 0
Iβm interested in your analysis here. Even with the recent price drop, weβve found that any system thatβs getting real traffic is probably still better off (read: gonna pay less) using autoscaling provisioned capacity.
26.01.2025 21:29
π 0
π 0
π¬ 1
π 0
Realistically Iβd probably start with using tenant ID as a PK prefix rather than by itself - tenant is unlikely to be granular enough to be partitioned well.
26.01.2025 21:28
π 1
π 0
π¬ 1
π 0
I see what you meant initially, then. I was thinking about it more like how I gather requirements - as a subject matter expert, but using it as a tool to organize my thinking and then communicate what Iβm doing to customers.
26.01.2025 18:14
π 1
π 0
π¬ 1
π 0
That AI generated nonsense diagram does not make me confident about trusting any of the information behind that linkβ¦.
26.01.2025 18:05
π 0
π 0
π¬ 0
π 0
Obsessed probably isnβt good, but figuring out the actual requirements for a solution is - often moreso than the actual form of the solution. Itβs also a great way to communicate, by asking βdid I forget anything important this has to do?β Agreed that this shouldnβt take a lot of time and effort.
26.01.2025 17:58
π 0
π 0
π¬ 1
π 0
Glad itβs working out for you!
24.01.2025 16:47
π 1
π 0
π¬ 0
π 0
Yeah, it's basically just removing some of the constraints on the final transactional write.
21.01.2025 19:18
π 1
π 0
π¬ 0
π 0
We started with serializable (and optimistic concurrency control) - we figure it's the "most correct" and we can always expose looser levels later if there's a need.
21.01.2025 18:39
π 1
π 0
π¬ 1
π 0