System Design ($200k+) · PERFORMANCE · Distributed Systems Core · 2026

Bloom Filter + Negative Caching vs Direct DB Lookup on Missing Keys

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 ConditionA malicious scraper sends 50,000 req/sec for random non-existent product IDs, bypassing Redis cache-aside and saturating PostgreSQL
Recommended ChoiceFront cache misses with an in-memory/Redis Bloom Filter (zero false negatives) plus short-TTL negative caching for absent keys
Classic TrapStandard cache-aside only caches existing rows—requests for non-existent IDs (cache penetration) hit the database 100% of the time.
VerificationAudited on 2026-11-23 · Distributed Systems Core · 2026

30-SECOND DECISION TRAP CHECK · PERFORMANCE

Test your instinct

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?

Primary Engineering Documentation

Related Performance Decision Guides