Caching, Search, and Noisy Neighbors

Module:Core concept

Search indexes are derived read models, not authorities for permissions or billing. Cache keys must include every response-changing dimension.

How to apply it

Use TTLs, invalidation events, stampede protection, and current authorization checks. Measure tenant resource use and enforce fair quotas/concurrency. Consider CQRS or dedicated tenant infrastructure only when evidence justifies complexity.

Worked example

Cap report concurrency for a heavy tenant so smaller tenants' interactive work remains responsive.

Common mistakes to avoid

Caching permissions indefinitely or extracting services based on arbitrary tenant-count thresholds.

Practice task

Implement this concept in the capstone. Add one positive test, one negative or failure-path test, and a short note explaining the trade-off you chose.

Key Takeaways
  • Search indexes are derived read models, not authorities for permissions or billing. Cache keys must include every response-changing dimension.
  • Use TTLs, invalidation events, stampede protection, and current authorization checks.
Knowledge Check

What is the strongest production practice for Caching, Search, and Noisy Neighbors?