Introduction
Modern cloud and microservice architectures rely heavily on load balancing and auto-scaling to maintain performance. Traditionally, these two mechanisms have been optimized independently or under steady-state assumptions. However, real-world traffic is often bursty, and system parameters like service rates are frequently unknown or non-stationary. This paper introduces a unified framework for jointly optimizing load balancing and auto-scaling using Weakly Coupled Markov Decision Processes (WC-MDPs).
Addressing the State Space Explosion
Modeling $N$ parallel queues as a single MDP leads to a combinatorial explosion of the state space, making traditional solvers impractical for large systems. The authors overcome this by formulating the problem as a WC-MDP, where individual queue states are linked by global constraints. To ensure tractability, they employ a Linear Programming (LP) relaxation that converts "hard" sample-path constraints into "soft" constraints on expectations. This approach is shown to be asymptotically optimal as the number of queues grows.
Online Learning via SGDA
The core of the proposed solution is a two-timescale online learning algorithm based on Stochastic Gradient Descent-Ascent (SGDA). This algorithm operates without prior knowledge of system dynamics:
- Fast Scale: Updates the policy decision variables.
- Slow Scale: Updates Lagrange multipliers (representing "shadow prices" for constraints) and estimates unknown transition probabilities from observed data.
This dual-scale approach allows the system to adapt to unknown or changing environments on the fly, effectively "learning" the optimal load balancing and scaling rules.
Key Insights and System Behavior
The authors' numerical simulations reveal several critical behaviors of the optimized system.
The Phase Transition in Job Acceptance
As shown in Figure (c) above, there is a distinct "phase transition" regarding job rejection. When the penalty for dropping a job ($\gamma$) is low, the optimal policy favors rejecting jobs to minimize energy and delay costs. However, once the penalty crosses a specific threshold, the policy abruptly shifts to accepting as many jobs as the high-speed service budget allows.
Budgeting vs. Consumption
Interestingly, increasing the budget for high-speed service ($\beta$) does not lead to linear increases in its use. As seen in Figure (b), the system's cost function naturally balances energy consumption against delay reduction. Once the marginal benefit of higher speeds is outweighed by the energy cost, the system tempers its use of high service rates, even if the budget permits more.
Impact of Traffic Load
Figure (a) illustrates how the use of high-speed service scales with the arrival probability ($p$). The regularization coefficient ($\Gamma$) plays a role in smoothing these transitions, with higher $\Gamma$ values leading to more gradual policy shifts.
Results and Convergence
The SGDA algorithm demonstrates robust convergence to the theoretical LP optimum. In simulations, the online learner's output approached the optimal solution (measured by the Frobenius norm) within approximately 35,000 iterations. Crucially, the online learner, which estimates parameters from samples, closely mirrors the trajectory of an offline version (GDA) that has full information, proving its stability and effectiveness in uncertain environments.
Conclusion and Future Directions
While the LP relaxation provides a scalable and asymptotically optimal solution, it satisfies constraints in expectation rather than on every individual sample path. Future work will focus on mapping these expectation-based policies to strict sample-path rules for highly volatile environments. Additionally, the authors plan to validate these findings in real-world distributed system testbeds to assess performance under non-synthetic traffic patterns.
Summary updated