Quick Decision Rule: When A malicious scraper sends 50,000 req/sec for random non-existent product IDs, bypassing Redis cache-aside and saturating PostgreSQL, choose Front cache misses with an in-memory/Redis Bloom Filter (zero false negatives) plus short-TTL negative caching for absent keys.
| Trigger Condition | A malicious scraper sends 50,000 req/sec for random non-existent product IDs, bypassing Redis cache-aside and saturating PostgreSQL |
|---|---|
| Recommended Choice | Front cache misses with an in-memory/Redis Bloom Filter (zero false negatives) plus short-TTL negative caching for absent keys |
| Classic Trap | Standard cache-aside only caches existing rows—requests for non-existent IDs (cache penetration) hit the database 100% of the time. |
| Verification | Audited on 2026-11-23 · Distributed Systems Core · 2026 |
30-SECOND DECISION TRAP CHECK · PERFORMANCE
An attacker floods `/api/users/{random_uuid}` with 40,000 req/sec of non-existent UUIDs. Because Redis cache-aside only stores valid users, 100% of those requests miss Redis and crush PostgreSQL. What stops this cache penetration attack?
A Bloom Filter rejects non-existent keys in O(1) memory before touching Postgres, and short-TTL negative caching shields repeated misses.
Trap: Cache penetration bypasses normal cache-aside because non-existent keys are never stored unless defended with a Bloom Filter or negative cache.