Multi-Objective Adaptive Rate Limiting in Microservices Using Deep Reinforcement Learning

Ning Lyu, Yuxi Wang, Ziyu Cheng, Qingyuan Zhang, Chen Feng · DOI

Abstract: As cloud computing and microservice architectures become increasingly prevalent, API rate limiting has emerged as a critical mechanism for ensuring system stability and service quality. Traditional rate limiting algorithms, such as token bucket and sliding window, while widely adopted, struggle to adapt to dynamic traffic patterns and varying system loads. This paper proposes an adaptive rate limiting strategy based on deep reinforcement learning that dynamically balances system throughput and service latency. We design a hybrid architecture combining Deep Q-Network (DQN) and Asynchronous Advantage Actor-Critic (A3C) algorithms, modeling the rate limiting decision process as a Markov Decision Process. The system continuously monitors microservice states and learns optimal rate limiting policies through environmental interaction. Extensive experiments conducted in a Kubernetes cluster environment demonstrate that our approach achieves 23.7% throughput improvement and 31.4% P99 latency reduction compared to traditional fixed-threshold strategies under high-load scenarios. Results from a 90-day production deployment handling 500 million daily requests validate the practical effectiveness of the proposed method, with 82% reduction in service degradation incidents and 68% decrease in manual interventions.

Introduction

In modern microservice ecosystems, rate limiting serves as the primary defense against system overloads. Traditional algorithms like "token bucket" or "leaky bucket" rely on static thresholds that fail to account for the bursty, unpredictable nature of cloud traffic. Manually tuning these thresholds is a labor-intensive process that often results in either unnecessary throttling or system instability. This research addresses the "Goldilocks problem" of rate limiting: restricting traffic enough to prevent crashes without sacrificing performance.

Methodology

System Architecture

The proposed system frames rate limiting as a Markov Decision Process (MDP). It consists of four primary stages: state monitoring, decision making via a hybrid DRL engine, execution through sidecar proxies, and continuous training.

Figure 1: Overview of the adaptive rate limiting system architecture, including the DRL decision engine and performance metrics.

As shown in the architecture, the system monitors an 8-dimensional state vector including CPU/memory utilization, queue depth, and error rates. The DRL Decision Engine then selects from seven discrete actions representing percentage adjustments to the current rate limit threshold (from -50% to +50%). These decisions are executed dynamically via Envoy's Route Discovery Service (RDS).

Hybrid DQN-A3C Model

To balance stability and exploration, the engine utilizes a hybrid approach. Deep Q-Networks (DQN) provide stable value estimation, while Asynchronous Advantage Actor-Critic (A3C) enables efficient exploration of the policy space.

Figure 2: Detailed neural network architectures for the DQN and A3C components, featuring the Decision Fusion Module.

A dynamic "fusion coefficient" ($\alpha$) manages the contribution of each model. Early in the training phase, the system prioritizes A3C's exploratory capabilities. As the model matures, it shifts toward the stable, value-based decisions of the DQN. This fusion ensures the system can adapt to new traffic patterns while maintaining a reliable baseline performance.

Experimental Results

Performance Benchmarks

The system was evaluated using the DeathStarBench suite and Locust-simulated traffic patterns (periodic, bursty, and mixed). In Kubernetes cluster experiments, the hybrid model significantly outperformed traditional methods:

  • Throughput: Achieved a 30.9% improvement over fixed-threshold strategies.
  • Latency: Reduced P99 latency by 38.2%.
  • SLA Compliance: Maintained a 98.7% compliance rate, keeping response times consistently below the 500ms target.

Production Impact

A 90-day deployment in a live environment handling 500 million daily requests demonstrated the system's practical utility. The implementation led to an 82% reduction in service degradation incidents and a 68% decrease in manual interventions. Crucially, the decision latency remained between 2-5 milliseconds, ensuring real-time responsiveness at the API gateway.

Conclusion and Future Work

While the hybrid DRL approach offers significant gains in throughput and stability, challenges remain regarding training overhead and model interpretability. Future research will focus on Transfer Learning to accelerate bootstrapping for new services and Explainable AI (XAI) techniques to provide operations teams with transparency into the agent's decision-making logic. Additionally, we aim to explore multi-agent coordination to manage rate limits across complex service dependency graphs.

Summary updated

BibTeX
@misc{lyu2025multi,
  author = {Ning Lyu and Yuxi Wang and Ziyu Cheng and Qingyuan Zhang and Chen Feng},
  title = {{Multi-Objective Adaptive Rate Limiting in Microservices Using Deep Reinforcement Learning}},
  year = {2025},
  eprint = {2511.03279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.03279},
}
Figure