Caching Strategies Every Backend Engineer Should Know
Cache-aside, read-through, write-through, write-behind — when each pattern fits, and the invalidation trade-offs nobody escapes.
Category
13 articles
Cache-aside, read-through, write-through, write-behind — when each pattern fits, and the invalidation trade-offs nobody escapes.
Bounded buffers, reactive pull-based demand, and log-based pull consumption: three ways streaming systems handle a slow consumer.
How the transactional outbox pattern makes updating a database and publishing an event atomic, without a distributed transaction.
Hash-based, range-based, and directory-based shard keys compared, and why resharding is the expensive part nobody plans for early.
CDNs now run edge compute, cache dynamic responses, and shield origin from thundering herds — far more than a cache for static files.
Transport-layer and application-layer load balancers make routing decisions with very different visibility — here's what each one trades off.
How consistent hashing limits data movement when nodes join or leave, and why virtual nodes are what makes it actually balanced.
Idempotency keys, atomic check-and-write, and why PUT being idempotent by spec doesn't make it the right tool for a retried write.
Choreography versus orchestration, compensating actions, and the eventual consistency you actually get from the saga pattern.
CQRS doesn't require event sourcing or a second database — a minimal, practical version of the pattern and when to reach for more.
Why storing immutable facts instead of current state changes how you build, replay, and evolve systems, and when it isn't worth the cost.
Message queues and event streams solve different problems — a practical comparison of consumption models, ordering, replay, and backpressure.
Fixed window, sliding window, token bucket, and leaky bucket rate limiters compared, with the burst and fairness trade-offs each one hides.