Guide
Premium
Intermediate
Real Projects

Cache-Aside in Production: TTLs, Invalidation, and How to Prevent Cache Stampedes

The complete guide to the cache-aside pattern with Redis: jittered TTLs, correct invalidation, and the three defenses against cache stampedes (distributed lock, single-flight, and XFetch). Expanded with stale-while-revalidate, fail-open and circuit breakers, two-tier caching with RESP3 invalidation, delayed double delete and CDC, hot keys, eviction and memory management, observability with Prometheus, testing, choosing an engine (Redis, Valkey, Memcached), and a complete TypeScript implementation. With production-ready code in Python and TypeScript.

36 minutes read
0 views

Verificando acceso...

Loading comments...

Related Resources

Guía
PREMIUM

Circuit Breakers: How to Prevent Cascading Failures in Distributed Systems

Learn to implement the circuit breaker pattern so a failing dependency never drags down your whole system: the three states (closed, open, half-open), sliding failure windows, limited probes to avoid thundering herds, robust fallbacks, and how to combine it with timeouts, retries, and bulkheads. Includes distributed state in Redis, observability with Prometheus, pytest testing, circuit breaking in Envoy/Istio, a full case study, and production-ready code in Python and TypeScript.

Guía

Database Indexing: Designing Indexes and Optimizing Queries in PostgreSQL

Learn to design indexes that genuinely speed up your queries: B-tree, composite, partial, and covering indexes. Includes how to read EXPLAIN ANALYZE, correct column ordering, the mistakes that silently disable an index, and what's new in PostgreSQL 18.

Guía
PREMIUM

Distributed Tracing with OpenTelemetry: Follow Every Request Across Your Services

Learn to instrument your services with OpenTelemetry and see each request's full journey: auto-instrumentation in Python and Node.js, custom spans with useful attributes, W3C context propagation (including manual propagation across queues), sampling strategies, and Collector configuration. Covers the cardinality and propagation mistakes that ruin traces in production. Expanded with span kinds, events and links, semantic conventions, correlating traces with logs and metrics (exemplars and span metrics), baggage, the Collector in production (agent + gateway and scaled tail sampling), sensitive-data redaction with OTTL, instrumentation testing, overhead control, systematic debugging of broken traces, gRPC and streaming, the OTel Operator on Kubernetes, burn-rate SLOs and a complete hands-on investigation case study.