Scalable Overload Control for Large-scale Microservice Architecture

Hao Zhou, Ming Chen, Qian Lin, Yong Wang, Xiaobin She, Sifan Liu, Rui Gu, Junfeng Yang

Introduction

In modern hyperscale microservice environments, such as WeChat’s backend which manages over 10 billion daily requests across 3,000+ services, traditional overload control mechanisms often prove inadequate. Standard approaches typically rely on centralized gateways or service-specific logic. However, these methods struggle with the complexity of large-scale Directed Acyclic Graphs (DAGs) of service dependencies, where a single user action can trigger a cascade of internal calls.

The Challenge of Subsequent Overload

A critical issue identified in such architectures is subsequent overload. In complex call graphs, a single top-level request may result in multiple internal calls to the same downstream service. If services drop requests randomly or based on simple local metrics, the probability of a top-level request succeeding decreases exponentially with the number of internal calls it requires. This phenomenon leads to "service hang," where the system consumes significant resources on partially completed tasks that ultimately fail, causing a total collapse in effective throughput.

Forms of service dependency and overload propagation.

The DAGOR System Design

To address these challenges, the DAGOR system (named for its focus on the service DAG) was developed as a decentralized, service-agnostic overload control framework. DAGOR shifts from service-specific heuristics to a system-centric approach based on three core pillars:

1. Queuing Time as the Health Metric

Unlike response time, which is "recursive" and often inflated by downstream delays, DAGOR monitors the average queuing time at each individual server. Queuing time provides a clean, local signal of a machine's processing health, independent of the performance of its dependencies. This allows for precise detection of resource exhaustion at the point of failure.

2. Two-Tier Priority Admission

To maintain system utility during surges, DAGOR implements a collaborative priority shedding mechanism. Requests are categorized by Business Priority (e.g., Login and Payments are prioritized over Moments updates) and User Priority (derived from a hash of the User ID).

Business priority hierarchy used for adaptive load shedding.

This dual-tier approach ensures that critical business functions remain operational. Furthermore, by using User ID hashing rather than session IDs, the system prevents users from bypassing load shedding by simply logging out and back in, which would otherwise create a flood of high-priority re-login requests.

3. Collaborative Shedding and Adaptive Control

Each server maintains a histogram of request priorities and uses an alpha-beta adjustment algorithm to determine a "compound admission level." When a downstream service becomes overloaded, it "piggybacks" its current admission level onto response headers. Upstream services detect this signal and perform early-stage shedding, preventing doomed requests from ever traversing the network and wasting bandwidth.

Real-World Performance and Insights

DAGOR has served as the backbone of WeChat for over five years. Evaluation through proprietary stress tests demonstrates its resilience:

  • Throughput Stability: In workloads where a task invokes an overloaded service twice ($M^2$), DAGOR maintains a 50% higher success rate compared to industry standards like CoDel or SEDA.
  • Fairness: While traditional methods often favor simpler requests, DAGOR provides consistent success rates regardless of workload complexity.
  • Scale: The system successfully manages massive traffic spikes, such as those during the Chinese Lunar New Year, where traffic can reach 10x the daily average.

Conclusion

DAGOR demonstrates that effective overload control in massive microservice architectures must be decentralized and priority-aware. By moving away from recursive metrics like response time and adopting a collaborative, user-consistent shedding strategy, DAGOR ensures system stability and high business utility even under extreme pressure.

Summary updated

BibTeX
@inproceedings{zhou2018scalable,
  author = {Hao Zhou and Ming Chen and Qian Lin and Yong Wang and Xiaobin She and Sifan Liu and Rui Gu and Junfeng Yang},
  title = {{Scalable Overload Control for Large-scale Microservice Architecture}},
  booktitle = {SoCC},
  year = {2018},
  url = {https://openreview.net/forum?id=QQ2cFT3sFM},
}
Figure