用深度强化学习动态调节微服务速率,提升吞吐量并降低延迟。
Multi-Objective Adaptive Rate Limiting in Microservices Using Deep Reinforcement Learning
- 结合DQN与A3C算法,将限流决策建模为马尔可夫决策过程。
- 高负载下吞吐量提升23.7%,P99延迟降低31.4%。
- 适合需要自适应流量管理的云原生系统,尤其在生产环境表现优异。
随着云计算和微服务架构的普及,API限流已成为保障系统稳定性和服务质量的关键机制。传统限流算法如令牌桶和滑动窗口虽广泛使用,但在应对动态流量模式和变化的系统负载时表现不足。本文提出一种基于深度强化学习的自适应限流策略,能够动态平衡系统吞吐量与服务延迟。设计了一种融合深度Q网络(DQN)与异步优势演员-评论家(A3C)算法的混合架构,将限流决策过程建模为马尔可夫决策过程。系统持续监控微服务状态,并通过环境交互学习最优限流策略。在Kubernetes集群环境中进行的大量实验表明,在高负载场景下,该方法相比传统固定阈值策略,吞吐量提升23.7%,P99延迟降低31.4%。为期90天的生产部署验证了其实际有效性,处理每日5亿请求,服务降级事件减少82%,人工干预下降68%。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。