The Real Fullstack

The Cascading Failure

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

架构师14 分钟调试实验室流程模拟器性能实验室
cdnspring-bootpostgresqlresilience4j

此挑战尚未翻译为简体中文,你正在阅读英文版本。

任务:Follow the chain across layers, name the root cause, and break each link that turns a cache purge into an outage.背景 · 学习目标 ▾

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.

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

学习目标

  • Recognise cascading failures and feedback loops.
  • Serve stale content while revalidating instead of flooding the origin.
  • Bound retries and shed load instead of queueing.
模拟模拟数据
web appCDNcatalog APIconnection poolPostgreSQL
运行模拟
# 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

简化说明

Four symptoms with deterministic fixes. Real cascades are messier and usually involve more services. 教学模型——数字用于说明行为,并非基准测试。

概念

建议先完成

相关挑战

参考资料