← All Exercises
Estimate Blast Radius of a Fault Injection
basicjavascript
Background
Chaos experiments are only meaningful when their expected impact is stated in advance. Estimating blast radius prevents experiments from becoming outages.
Problem
From injected failure percentages per dependency and request volume, compute the affected request count and the overall failure exposure.
Input
JSON object: { requestsPerMinute, injections: [{ dependency, percent }] }Output
JSON object: { affectedPerMinute: [{ dependency, requests }], expectedFailures, exposurePercent }Sample tests
Sample 1
Input: {"requestsPerMinute":1000,"injections":[{"dependency":"db","percent":10}]}Expected: {"affectedPerMinute":[{"dependency":"db","requests":100}],"expectedFailures":100,"exposurePercent":10}Sample 2
Input: {"requestsPerMinute":1000,"injections":[{"dependency":"db","percent":10},{"dependency":"cache","percent":20}]}Expected: {"affectedPerMinute":[{"dependency":"db","requests":100},{"dependency":"cache","requests":200}],"expectedFailures":300,"exposurePercent":30}Your solution
Learning objective
State expected impact before running a chaos experiment.