Skip to main content
December 3, 2026

How Uber Validates Failover Resilience In Production

Johan Mena

Staff Software Engineer

Tony He

Software Engineer

Jingyu Cai

Senior Software Engineer

Glowing network nodes and lines form a spiral galaxy pattern against a star-filled cosmic background.
Share this article

Overview

Ensuring failover resilience is critical for maintaining business continuity at Uber’s scale. Historically, validating this depended exclusively on running company-wide drills that were difficult to coordinate. To improve this, we created Muttloader, a system that automates load testing on individual services directly in production. Muttloader allows us to safely and continuously validate that key services can handle failover load, increasing our confidence that company-wide drills will succeed.

The Problem With Not Testing Resilience

October 2020 was a Halloween horror story for Uber Engineering: a database cluster critical for tracking Delivery orders failed in one of our data center regions, leaving roughly half of orders unassigned for hours during our busiest time of the week. On-call teams executed a regional failover to divert traffic away from the affected cluster and mitigate its impact, but the remaining region, already strained by high demand, struggled to keep up and overloaded. The mitigation became an outage of its own. While Uber had long maintained a failover testing process, this incident proved that resilience at peak traffic was necessary for business continuity, and that it had to be continuously validated.

Traffic split at the edge, routed 50% each to DCA and PHX regions, each with multiple zonal infrastructures and services.Figure 1: Services replicated across data center regions and zones.Our failover testing process relied on company-wide drills executed directly in production. This exercise gave us high result fidelity but had drawbacks that kept us from running it often: it required significant coordination across many teams, it didn’t always run at peak traffic due to risk, and a single key under-provisioned service could abort the whole drill. With services deploying continuously, our confidence that a failover would be safe was inversely proportional to the time since we last drilled.

How could we increase our confidence in failover resilience without running a full drill every day?

Simulated Load Isn’t Enough

The obvious answer was to simulate this scenario by creating a staging environment and load testing it with synthetic traffic on a regular basis.  But this solution quickly fails at our scale:

  • Prohibitive environment setup costs: Standing up staging environments with appropriate downstream dependencies and setting up payloads that reflect real-world behavior is an expensive task for individual service teams, and a very hard task for a central team.
  • Endless maintenance: With thousands of services evolving continuously, keeping staging and production in sync is not feasible. Furthermore, maintaining realistic synthetic traffic is a challenge that demands ongoing, dedicated effort, exceeding the bandwidth of any individual team.
  • Hard to use load testing tools. While Uber had load testing tools capable of generating synthetic traffic to simulate the effect of failovers, they were hard to use due to the broad infrastructure knowledge required to correctly set them up for complex failover scenarios, resulting in limited engineering adoption.
  • Low-fidelity results. Production traffic has properties that are hard to simulate, including organic traffic changes throughout the day, fluctuating cache hit rates, unexpected user behavior … even a single parameter in a request can completely change a service’s execution path and throw off results.
  • Side-effect risks. Capturing and replaying real requests, as Uber’s Ballast does, is a great fit for validating the performance of isolated workloads, but centrally guaranteeing that replayed requests cause no side effects in production is hard, especially for writes.

Our conclusion was that to truly validate failover resilience, we had to test in production with live traffic. There’s just one problem: it’s production.

Muttloader: Increasing Load By Rerouting Live Traffic

Traffic drains are mitigation operations that leverage Muttley, our service mesh load balancer, to temporarily reroute production requests away from unhealthy instances. This has the side effect of increasing load on the remaining healthy instances. Initially, we manually leveraged this mechanism to run ad-hoc load tests on critical services and derisk the more complex and operationally expensive failover drills. However, running load tests to failover load often required multiple engineers to carefully time and execute a sequence of drains while meticulously watching dashboards for issues. If the service degraded, the test failed and they manually aborted, and if it reached the target load for a required amount of time, it succeeded.

Muttloader is the automation of applying a sequence of Muttley traffic drains for the purpose of load testing, but with the planning, execution, monitoring, and safety that an engineer used to provide by hand built into the platform. 

Traffic Shifter adjusts load on service instances, monitored by Health Monitor for resources, errors, and latency.Figure 2: Muttloader architecture, composed of a traffic shifter and a health monitor.The system accepts two primary inputs: a service and a load target (typically a CPU utilization percentage). During the test, it finds a way to safely reach the load target by moving live requests onto fewer instances while ensuring they remain healthy. The system has two primary components: a traffic shifter and a health monitor.

Moving Traffic On Autopilot

At the core of Muttloader is a traffic shifter driven by a PID (proportional-integral-derivative) controller. This component runs a control loop where each iteration computes the delta to a target load and outputs a precise traffic adjustment percentage to close the gap. Once it reaches the CPU target, it continues making small traffic adjustments to maintain it for a configurable duration even as the incoming traffic fluctuates organically, a key capability given Uber’s highly cyclical traffic patterns.

Tuning a PID controller is normally a manual, per-service exercise, and doing it for thousands of services with different capacities and traffic profiles is operationally impossible. Our approach is to find a default configuration that works safely for most services without any tuning, and to expose a small number of knobs for the services that need something different.

Defaults: Through empirical simulations, we found that the controller behaves well when the Proportional (P) and Derivative (D) parameters are set to low fixed values, which prevents overshooting CPU targets and overloading services. The Integral (I) parameter is set dynamically based on properties like the service's capacity and its ratio of requests per second to CPU utilization, both of which are derived from real-time metrics before starting the test. These defaults make the controller reach CPU targets at a reasonable pace without users knowing anything about the service under test.

CPU utilization rises then drops as requests per second spike in one zone and return to baseline after 14:00.Figure 3: PID controller reaching a CPU target by moving increasing amounts of production traffic.Customizations: For services that require something different, we expose certain knobs. The step duration sets how often the PID controller performs an iteration, indirectly changing its aggressiveness. The soak duration sets how long the final load target must be sustained for a test to be considered successful, uncovering issues like file descriptor leaks that only appear at certain loads after some time. The step limit allows users to set a cap on the maximum number of steps the system can execute before giving up.

But while the traffic shifter is an important component of the system, it only works as long as the service is healthy.

Safety Is The Product

Stakes are high when your tests run in production. There the core component for ensuring that Muttloader tests are safe is the health monitor, which is split into a few subcomponents. 

Service Eligibility

Filtering out services that have a low chance of completing a load test is paramount to ensuring production safety. The Eligibility Validator is the safety component that determines whether a load test with live traffic on a candidate service will be safe and runs just before the test runs. The criteria include invariants like:

  • Capacity: must be appropriately distributed across zones and regions so there’s somewhere to send the displaced load.
  • Traffic: must be high and consistent enough with low volatility to reach the desired load target.
  • Topology: must allow for quick and safe traffic redirection to mitigate issues quickly if they arise.
  • Scalability: CPU utilization must scale somewhat predictably with respect to RPS so the PID controller works correctly.

Candidate Service passes through Eligibility Validator with six criteria; eligible services proceed to Run Test, ineligible are stopped.Figure 4: Eligibility validations before running a test.Not all services pass the eligibility stage, and so they’re ineligible for load testing with live traffic. That’s a tradeoff we’re willing to accept because the alternative is testing services that we can’t keep safe.

Anomaly Detection and Signal Monitoring

After a service is deemed eligible, we must guarantee its safety with a high degree of confidence. During a load test, Muttloader continuously watches hundreds of signals to determine if a test should be stopped. The set of metrics it monitors is the results of running and analyzing tens of thousands of load tests, and experimenting with several algorithms. 

Every service has high-priority alerts registered in our in-house alerting system, defined by engineers that work on them. Muttloader subscribes and monitors them during a test, but with increased sensitivity via tighter aborting thresholds—our goal is to detect degradation before alerts fire to avoid disrupting on-call engineers and to stay within business-defined SLAs.

Muttloader regularly polls for service metrics and applies its own rulesets to decide if it needs to stop a test. One of the best overload metrics we have found is request queue processing latency, which invariably rises before response latencies spike, so it is closely monitored as a stop signal. Other metrics like container CPU and memory utilization are monitored using static thresholds, while response latencies are monitored with baselines computed before each test. Tests are immediately aborted on any unexpected process exits—even if they’re unrelated to our tests.

Other conditions that stop our load tests may be temporary and unrelated to the service under test, but can nonetheless affect production safety. These include issues like network infrastructure packet loss and increased inter-and-intra-zone latencies; degradations on key Muttloader dependencies, like the control plane for traffic drains; and company-wide operation lockdowns.

Platform Safeguards

Eligibility and detection minimize the risk of issues on services during a test, but Muttloader itself is a system that manipulates production, and over years of operating it, we’ve learned that a bug in the platform itself can be as damaging as an overloaded service. These safeguards exist to address the issues we have found along the way:

To increase the confidence that Muttloader updates are safe while minimizing the risk on our production fleet, we gate every code deployment with automated end-to-end load tests that run on synthetic, low-priority production services maintained by our team for the sole purpose of validating Muttloader. These tests allow us to verify key production invariants that would otherwise be hard to validate with only unit and integration tests. Invariants include the PID controller loop converging on target loads, halting tests when services show signs of overload, and ensuring that there’s no extra load on services when tests finish. Failure to validate these invariants results in a code rollback and a human review.

We also use environment partitioning and tiered deployments to increase safety. Originally, a single production Muttloader environment executed load tests across all services. A bug introduced in Muttloader then caused an incident on a service that had a weekly test scheduled to run just after the bug had been deployed. In response, we partitioned the production environment based on the criticality of the service under test: new code must first bake in an environment restricted to run on low-priority production services. After a few days of baking, the deployment is promoted to another environment to run on any service, ensuring that high-priority services are protected from new code.

Another safeguard we use is lingering test detection. Early in the project, we foresaw a situation where our system could ‌fail to remove load after a test finished, potentially leaving production services in a permanent load test state. Given that this could be triggered by a variety of edge cases, we found it worthwhile to invest in a lingering load test detection system. Every traffic movement operation Muttloader performs requires setting an expected expiration time; another system continuously checks for any expired operations and pages our team if anything is found.

Challenges with Muttloader

Muttloader continues to evolve as we address several engineering challenges.

Containing Blast Radius

The larger the scope of the test, the more realistic it is, but also the higher the impact of a production incident if anything goes wrong. Over the years, we’ve reduced the scope of our tests to the smallest size that can produce reasonable confidence in the results.

Stateful Systems

Muttloader raises load by rerouting requests, which assumes that any instance of a service can serve any request. Stateful systems like our storage layers break this assumption: requests must land on the instances that hold the data, so their traffic can't simply be shifted onto fewer nodes. Today we cover these systems indirectly by load testing the stateless services in front of them, but directly validating stateful systems remains an open challenge.

Noisy Alerts

When an alert fires during a test, it’s not always clear whether the alert reflects a real degradation, a pre-existing condition unrelated to the test, or pure noise. Nonetheless, Muttloader prioritizes safety and aborts tests, coupling the success rate of load tests to the alert quality of each service. We allow service owners to relax safety monitoring by excluding alerts they know are noisy.

Hardware Diversity

At our scale, we can’t assume the hardware in two zones or even the hardware inside a single zone is homogeneous. When the worst case matters, we perform a real-time regression analysis on the candidate service to identify the slowest zone on which to run the test.

Test Scheduling

Production traffic fluctuates throughout the day, and sometimes a service won’t receive enough live traffic for Muttloader to push it to a specified load target. Load tests may also affect the service’s upstreams and downstreams, so Muttloader needs to ensure that concurrent load tests don’t exacerbate failures along a dependency chain.

Impact and Results

Muttloader has run tens of thousands of load tests directly in production without human supervision over the past five years and now runs 2,000 load tests per month on close to 500 unique services. Three results stand out.

First, improved failover safety. Thanks to automated load tests, we validate capacity safety for critical services with no manual setup and no active human monitoring. Instead of waiting for infrequent failover drills, teams whose services are tested have continuous confidence that services can handle failover loads, making failover drills less risky during key dates. In late 2025, Muttloader tests found and remediated 39 critical services that would have been unable to handle predicted failover load during busy holiday periods. And in a large outage in 2026, no service running Muttloader tests reported capacity overload issues.

Second, optimized service efficiency. Knowing a service’s operational limits lets autoscalers provision capacity with less buffer. The results of Muttloader load tests are fed directly into Uber’s centralized stateless autoscaler system, and across a large fleet of services, those smaller buffers translate into tens of millions of dollars in compute savings. Since 2025, various initiatives have enabled the return of 125,000+ CPU cores.

Finally, Muttloader’s traffic shifting is a mechanism that has proven reusable beyond just load testing, powering library safety tests that canaries new library releases before landing on main (catching 75 regressions in late 2025), performance A/B tests that benchmark new load balancing algorithms, and race condition tests that surface bugs only visible under real production conditions.

Conclusion

Company-wide failover drills validate whether our fleet of thousands of services can handle failover load, but require heavy coordination, preventing us from running them often. To complement them, we built Muttloader, allowing us to validate individual services frequently and safely. Unlike traditional load testing tools that run in non-production environments, Muttloader tests run directly in production by intelligently concentrating load on a subset of a service’s instances, and aborting automatically on signs of degradation. Frequent failover validation with production Muttloader load tests have made company-wide failover drills less risky and significantly improved the efficiency of our fleet.

Acknowledgments 

We thank Pawel Krolikowski for reviewing drafts of this blog post.

Cover Photo Attribution: Generated with Gemini.

Diagram Attribution:  Generated with Claude Code.


Written by

Johan Mena

Staff Software Engineer

Johan is a Staff Software Engineer at Uber on the Production Engineering team based in New York City. He focuses on building software that makes Uber more efficient and safer at scale.

Tony He

Software Engineer

Tony is a Software Engineer based in San Francisco focused on efficiency and reliability.

Jingyu Cai

Senior Software Engineer

Jingyu is a Senior Software Engineer based in San Francisco on the Production Engineering team focused on observability, reliability, and efficiency.

Albert Wang

Senior Staff Technical Lead Manager

Albert is a Senior Staff Technical Lead Manager based in San Francisco in the Production Engineering org.

Fumin Wang

Senior Software Engineer

Fumin is a Senior Software Engineer based in Austin focused on efficiency and reliability.

Related articles
6 articles