Treino de Falhas

A pergunta de entrevista que separa os seniores: 'o que acontece se isto falhar?' Percorra cada cascata uma falha por vez e depois revele como sistemas reais contêm o raio de impacto.

Caching

A hot cache key expires under load

Gatilho

A popular key (e.g. the homepage feed) expires while receiving 50k req/s.

A cascata

  1. 1Every request misses the cache simultaneously
  2. 2All of them hit the database at once (thundering herd)
  3. 3DB connection pool saturates, queries queue up
  4. 4Latency spikes → upstream timeouts → retries → more load
  5. 5Database falls over, cascading to every dependent service
Passo 1 de 5

Raio de impacto

Entire read path for anything backed by that database.