Scaling a Database: Climb the Ladder Before You Shard
Before you shard, read the query plan. The order that works for scaling a database: indexes, a bigger box, read replicas, a cache, then sharding, and what each costs.
Blog series
A practical path through code boundaries, dependency direction, distributed systems, resilience, data, and the trade-offs that appear as software grows.
Page 2 of 2
Before you shard, read the query plan. The order that works for scaling a database: indexes, a bigger box, read replicas, a cache, then sharding, and what each costs.
When one request crosses ten services, no single log tells the story. Trace IDs, RED metrics, SLOs, burn-rate alerts and sampling, explained with sources.
Microservices give teams room to move, and the bill comes in operations, data, observability, testing and coordination. What each line costs and how to tell you're ready.
Layered code groups files by kind; vertical slices group them by request. How each shapes coupling, when sharing pays off, and how to switch one feature at a time.
Dependency direction is one rule about who may know what: business rules don't import frameworks, databases or vendor SDKs. A refund example shows why it pays off.
Eventual consistency from the user's side: how stale each feature may be, how the screen should say pending, and how to catch data that never catches up.