The Real Fullstack

The Cascading Failure

Someone updated prices. Twenty seconds later the whole shop was down. What chain of events connects the two?

Arquiteto14 minLaboratório de depuraçãoSimulador de fluxoLaboratório de performance
cdnspring-bootpostgresqlresilience4j

Este desafio ainda não foi traduzido para Português (Brasil). Você está lendo a versão em inglês.

Missão:Follow the chain across layers, name the root cause, and break each link that turns a cache purge into an outage.Contexto · Objetivos de aprendizagem ▾

Hollow Basket's CMS purges the entire CDN on every price change. Cache hits drop from 97 % to 3 %, the API's connection pool is exhausted within seconds, requests wait 30 s for a connection, and the SPA retries every failed call three times immediately.

Missão: Follow the chain across layers, name the root cause, and break each link that turns a cache purge into an outage.

Objetivos de aprendizagem

  • Recognise cascading failures and feedback loops.
  • Serve stale content while revalidating instead of flooding the origin.
  • Bound retries and shed load instead of queueing.
SimulaçãoSimulado
web appCDNcatalog APIconnection poolPostgreSQL
Executar simulação
# CDN: serve the old page while one request refreshes itCache-Control: public, max-age=300, stale-while-revalidate=600, stale-if-error=86400# purge only the changed products (surrogate keys), not the whole site

Simplificação

Four symptoms with deterministic fixes. Real cascades are messier and usually involve more services. Modelo educacional — os números ilustram comportamento, não são benchmarks.

Conceitos

Útil antes deste

Desafios relacionados

Referências