Users see stale prices. Admins update settings but the old value is served for 10 minutes. You delete a record but it keeps appearing. Cache invalidation is famously hard — and most implementations have subtle bugs that serve wrong data long after the source changed.
Cache stampede (a.k.a. thundering herd on TTL expiry) is one of the most dangerous failure modes in high-traffic systems. The moment your cache key expires, hundreds of simultaneous requests hammer your database — often killing it. Here's how it happens, and exactly how to fix it.
You add ON DELETE CASCADE to a foreign key. You delete a test organization. It cascades to users, which cascades to sessions, orders, invoices, activity_logs — 10,000 rows gone in milliseconds. No warning, no undo. Cascade deletes are powerful and dangerous.
Debezium captures database changes at the source: WAL logs for PostgreSQL, binlog for MySQL. Stream changes to Kafka, Redis, Elasticsearch, or vector DBs instantly.