[Paper Review] Cast: Automated Resilience Testing for Production Cloud Service Systems
Cast provides an automated end-to-end framework for resilience testing of production microservice systems by replaying production traffic with a comprehensive application-level fault library, guided by a complexity-driven test selection strategy and automated multi-faceted verification.
The distributed nature of microservice architecture introduces significant resilience challenges. Traditional testing methods, limited by extensive manual effort and oversimplified test environments, fail to capture production system complexity. To address these limitations, we present Cast, an automated, end-to-end framework for microservice resilience testing in production. It achieves high test fidelity by replaying production traffic against a comprehensive library of application-level faults to exercise internal error-handling logic. To manage the combinatorial test space, Cast employs a complexity-driven strategy to systematically prune redundant tests and prioritize high-value tests targeting the most critical service execution paths. Cast automates the testing lifecycle through a three-phase pipeline (i.e., startup, fault injection, and recovery) and uses a multi-faceted oracle to automatically verify system resilience against nuanced criteria. Deployed in Huawei Cloud for over eight months, Cast has been adopted by many service teams to proactively address resilience vulnerabilities. Our analysis on four large-scale applications with millions of traces reveals 137 potential vulnerabilities, with 89 confirmed by developers. To further quantify its performance, Cast is evaluated on a benchmark set of 48 reproduced bugs, achieving a high coverage of 90%. The results show that Cast is a practical and effective solution for systematically improving the reliability of industrial microservice systems.
Motivation & Objective
- Motivate the need for resilience testing in production-grade microservice systems due to complex, non-deterministic failures.
- Develop an end-to-end framework that achieves high fidelity by replaying live traffic with realistic application-level faults.
- Address scalability through a complexity-driven test selection strategy to prune redundant tests.
- Automate testing lifecycle with a three-phase pipeline and a multi-faceted verification oracle.
- Demonstrate real-world effectiveness through large-scale Huawei Cloud deployment and controlled benchmark evaluation.
Proposed method
- Capture and replay production traffic using dynamic instrumentation to create replayable traces with parameterized dynamic variables.
- Apply a two-stage heuristic to identify state-dependent variables from request/response payloads and replace them with placeholders for replay.
- Aggregate traces with Drain to identify distinct interfaces and compute per-interface complexity scores for targeted test selection.
- Construct an extensible fault library modeling platform component exceptions and inter-service communication errors, injected at fine-grained endpoints.
- Define endpoints as (Component, Framework, Method) and use data-flow dependency patterns to prune tests via cross-service sampling, intra-trace elimination, and data-flow prioritization.
- Execute tests in a three-phase pipeline (startup, fault injection, recovery) with a fail-fast strategy and batch testing to minimize startup overhead, plus a multi-faceted verification oracle across phases and assertion points.
Experimental results
Research questions
- RQ1RQ1: How effective is Cast at making recorded production traffic replayable after identifying dynamic variables?
- RQ2RQ2: How effective is Cast at automatically discovering resilience vulnerabilities in production microservice systems?
Key findings
- Cast replayed 286 out of 291 interface traces after dynamic variable templating, achieving 98.3% replay success compared to <80% with naive replay.
- The dynamic variable identification method handles state dependency effectively across most interfaces, with 5 edge cases requiring manual variable registration.
- In eight months of Huawei Cloud deployment, Cast uncovered 137 potential vulnerabilities across four large-scale applications, with 89 confirmed by developers.
- In a controlled benchmark of 48 reproduced bugs, Cast achieved 90% detection coverage.
- Cast demonstrated practical effectiveness for systematically improving reliability in industrial microservice environments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.