Skip to content
tezvyn:
Menu

Chaos test for gray-failure cascades in shared services?

Source: interviewHardHow cards are made

Summary

Detecting subtle cascading failure.

Key points

Inject partial latency into a shared service, hypothesize tenants stay isolated within steady state, and monitor cross-system queue depth, pool saturation, retries, and per-tenant SLIs.

What's really being asked

Whether you understand that gray failures, partial degradation rather than clean outages, are the hardest to detect and the most likely to cascade, and that shared multi-tenant services concentrate that risk.

The full answer

Design the fault as a partial degradation, not a kill: inject elevated latency, say a percentile-targeted slowdown, or a small fraction of errors into the shared service, optionally affecting only some requests, mirroring a real gray failure that health checks may still report as healthy. The steady-state hypothesis spans systems: tenant isolation holds so one tenant's load or the degradation does not breach other tenants' SLIs, and downstream and upstream dependents stay within their steady state because timeouts, bounded retries, bulkheads, and circuit breakers contain the slowdown. Monitor across multiple systems, not just the injected one: per-tenant latency and error SLIs to detect noisy-neighbor or cross-tenant blast, caller-side thread and connection pool saturation and queue depths to catch Little's Law amplification, retry rates and circuit-breaker open or half-open state to see whether the system is absorbing or amplifying, and resource saturation on shared infrastructure. Distributed traces tie the chain together. Crucially, watch tail percentiles, not averages, since gray failures hide in the tail.

The mistakes people make

Injecting a hard down instead of partial degradation, missing the gray-failure class. Monitoring only the injected service's average metrics, which mask both tail latency and cross-tenant impact. Ignoring retry amplification and pool saturation in callers. Assuming tenant isolation without measuring per-tenant SLIs.

What usually comes next

Why do averages hide gray failures. How does retry amplification cause cascades. How do you ensure tenant isolation, quotas, bulkheads, fair queuing. What makes gray failures hard to detect with health checks.

A concrete example

In a shared metadata service used by many tenants, you inject 300ms of added latency on 10 percent of requests for one tenant's traffic. The hypothesis is that other tenants' p99 stays flat and no caller's pool saturates. Dashboards reveal that a caller's bounded thread pool fills as Little's Law predicts, its retries amplify load on the shared service, and a second tenant's p99 climbs, exposing a missing bulkhead and a retry storm, a cascading gray failure caught before it hit production.

Interview question

When designing a chaos experiment to expose a gray-failure cascade in a shared multi-tenant service, why are average metrics on the injected service alone insufficient?

  • a.Averages are always inaccurate and should never be used
  • b.Averages cannot be computed during fault injection
  • c.Multi-tenant services do not emit per-tenant metrics
  • d.Gray failures hide in tail percentiles and cascades show up cross-system, so you must watch per-tenant SLIs and caller saturationCorrect
Why?

Gray failures manifest in tail latency and propagate to other tenants and callers, so averages on one service mask the real impact. You must monitor tail percentiles, per-tenant SLIs, and caller-side saturation and retries across systems.

Just read this? Test yourself on what you have been reading.

Read the original → principlesofchaos.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles