The Runtime Theory
Backend EngineeringIn production

Caching for the Service Layer

Recording in progress
#caching#redis#performance

A service-layer cache sits between your handler and your database, trading stale data for latency. This video shows where the cache lives in the request path, how a cache key is built from request data, and what invalidation strategies actually do when the underlying data changes — including the stampede that happens when a hot key expires.

Topics covered:

  • Where the cache sits in the request path
  • Cache keys: what identifies a response and its dependencies
  • TTLs and staleness: how fresh is fresh enough
  • Invalidation: write-through, write-behind, delete-on-write
  • Cache stampede: the thundering herd on a missed key
  • Distributed caches: Redis, consistency, and network latency

Related articles

More in Backend Engineering

In production
backend

Pagination Strategies

Offset, keyset, and cursor pagination compared by database cost, consistency, and behavior when rows are inserted mid-page.

Details
In production
backend

Webhooks vs Polling

Webhooks and polling compared at the delivery level — delivery guarantees, retries, and when push is worse than pull.

Details
In production
backend

Database Transactions in Practice

ACID in a real database — write-ahead logs, locks, undo and redo, plus isolation levels and what they change about reads.

Details
In production
backend

Rate Limiting Algorithms, Visualized

Token buckets, leaky buckets, and sliding windows compared by memory, precision, and what they do under burst load.

Details
In production
backend

API Idempotency Keys

How idempotency keys work at the storage level — dedupe tables, unique constraints, and making retries safe for clients.

Details
In production
backend

Background Job Processing

Queues, workers, and retries — how background jobs actually execute, from enqueue to acknowledgment, and why they fail.

Details
In production
backend

REST APIs from the Inside

What happens when a REST API processes a request — routing, deserialization, validation, handlers, and response building end to end.

Details
In production
backend

Message Queues in Practice

Brokers, producers, and consumers — what a queue does at the protocol level and why it decouples services from availability.

Details
In production
backend

Connection Pooling Explained

What a connection pool actually does — the handshake cost it hides, checkout and release mechanics, and how pool size changes latency.

Details

Depth, delivered weekly

One technical dispatch a week — articles and episode notes before they go public.

One technical dispatch per week. No noise.