Connection Pooling Explained
Opening a database connection means a TCP handshake, TLS negotiation, and authentication — easily tens of milliseconds before the first query. This video shows how a pool hides that cost by keeping connections open, how checkout and release work under load, and the failure mode when the pool is exhausted.
Topics covered:
- Why a connection is expensive: handshake, TLS, and auth
- Pool mechanics: checkout, use, release, and the wait queue
- Pool size math: connections per core and per-query latency
- The exhausted pool: symptoms and how to diagnose it
- Idle timeouts and eviction: when connections go stale
- Pooling beyond databases: HTTP keep-alive and gRPC
Related articles
Connection Pools Aren't Free
Pool sizing, exhaustion, idle connections, and the hidden queue — why 'just add a pool' is incomplete advice.
Caching Strategies at the Service Layer: Redis, Local Cache, and Cache-Aside
Service-layer caching compared: cache-aside, write-through, TTLs, invalidation, stampede control, and Redis vs in-process cache tradeoffs.
Latency Numbers Every Engineer Should Know
A working model of time on modern hardware: the real cost of a cache miss, a syscall, a network hop, and a disk read — and why these numbers are the vocabulary of systems thinking.
More in Backend Engineering
Pagination Strategies
Offset, keyset, and cursor pagination compared by database cost, consistency, and behavior when rows are inserted mid-page.
DetailsCaching for the Service Layer
Service-layer caching done right — cache keys, invalidation, TTLs, and the stampede problem that brings services down.
DetailsWebhooks vs Polling
Webhooks and polling compared at the delivery level — delivery guarantees, retries, and when push is worse than pull.
DetailsDatabase Transactions in Practice
ACID in a real database — write-ahead logs, locks, undo and redo, plus isolation levels and what they change about reads.
DetailsRate Limiting Algorithms, Visualized
Token buckets, leaky buckets, and sliding windows compared by memory, precision, and what they do under burst load.
DetailsAPI Idempotency Keys
How idempotency keys work at the storage level — dedupe tables, unique constraints, and making retries safe for clients.
DetailsBackground Job Processing
Queues, workers, and retries — how background jobs actually execute, from enqueue to acknowledgment, and why they fail.
DetailsREST APIs from the Inside
What happens when a REST API processes a request — routing, deserialization, validation, handlers, and response building end to end.
DetailsMessage Queues in Practice
Brokers, producers, and consumers — what a queue does at the protocol level and why it decouples services from availability.
DetailsDepth, delivered weekly
One technical dispatch a week — articles and episode notes before they go public.
One technical dispatch per week. No noise.