The Real Fullstack

The Thread Pool Collapse

Only the product page calls the pricing API. So why did checkout and the health check go down too?

高级工程师10 分钟性能实验室流程模拟器
javaspring-boothttpresilience4j

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

任务:Inject the incident to see the collapse, then keep the whole service fast and error-free while pricing stays slow — without simply throwing more threads at it.背景 · 学习目标 ▾

Fernway's Spring Boot web tier serves 300 requests per second with a pool of 50 request threads. 30% of requests (product pages) call an external pricing API, normally in 80 ms. Tonight the pricing provider degrades to 2 seconds per call.

任务: Inject the incident to see the collapse, then keep the whole service fast and error-free while pricing stays slow — without simply throwing more threads at it.

学习目标

  • Explain how blocking calls to a slow dependency exhaust a shared thread pool.
  • Use timeouts, circuit breakers and fallbacks to contain a failing dependency.
  • Tell apart a capacity fix from a resilience fix.
模拟
模拟数据
ShoppersWeb tierPricing API
运行模拟

运行模拟以查看输出。

简化说明

Steady-state queueing (M/M/c) with a single dependency. Real incidents have bursts, garbage collection and timeouts at several layers. 教学模型——数字用于说明行为,并非基准测试。

概念

相关挑战

参考资料