Performing Load Balancing under Constraints

Andrea Fox, Francesco De Pellegrini, Eitan Altman, Arnob Ghosh, Ness B. Shroff

Abstract

Traditional load balancing algorithms, such as Join-the-Shortest-Queue (JSQ), prioritize minimizing system delay but often overlook physical and operational constraints inherent in real-world infrastructure. This paper addresses the challenge of "safe" load balancing by framing the problem as a Constrained Markov Decision Process (CMDP). We evaluate three novel policies—JSVED, JSED-k, and JSSQ—designed to respect hard boundaries like bandwidth limits and minimum server utilization. Our findings highlight JSSQ as a particularly robust solution, leveraging convex optimization to achieve near-optimal performance with minimal memory overhead, even in large-scale distributed systems.

Introduction

In modern distributed systems, ranging from global cloud datacenters to localized IoT networks, the dispatcher plays a critical role in system efficiency. The primary objective of a dispatcher is to route incoming tasks to a set of parallel servers to minimize waiting times. For decades, variants of the Join-the-Shortest-Queue (JSQ) algorithm have been the industry standard due to their ability to minimize system occupancy.

However, traditional JSQ is "constraint-blind." In practice, dispatchers must navigate complex physical limitations. For example, a communication link might have a strict bandwidth cap that cannot be exceeded without causing packet loss, or a facility might require a minimum level of server activity to justify the energy costs of keeping hardware powered on. When these constraints are introduced, standard algorithms can inadvertently lead to system instability or violation of service-level agreements. This research seeks to bridge the gap between performance-centric routing and safety-critical constraints.

Methodology

The authors utilize the Constrained Markov Decision Process (CMDP) framework to model the environment. In this setup, the goal is to minimize a primary cost function (system occupancy) while ensuring that secondary cost functions (constraint violations) remain below a predefined threshold. Three lightweight, online policies are proposed:

1. Join the Shortest Virtual Expected Delay (JSVED)

JSVED introduces the concept of "virtual queues" that represent the physical constraints of the system. By monitoring these virtual states alongside physical queue lengths, the dispatcher naturally steers traffic away from servers nearing a constraint violation. While this method guarantees safety, it is often overly conservative, leading to higher system occupancy than necessary.

2. JSED with Memory (JSED-k)

This policy incorporates a sliding window of the last $k$ actions to inform current routing decisions. By maintaining a history of recent assignments, the dispatcher can estimate the likelihood that a new task will push a server beyond its safety limits. While effective for small-scale clusters, the memory requirements for JSED-k scale poorly as the number of servers increases, creating a "scalability wall."

3. Join the Shortest Safe Queue (JSSQ)

JSSQ represents the most significant contribution of the paper. It operates in two stages: first, it solves a convex nonlinear optimization problem to identify ideal arrival rates and target queue lengths for each server. Second, it employs a randomized routing strategy to maintain the system state near these targets. This approach allows the dispatcher to make safe, real-time decisions using only $O(1)$ memory, making it highly suitable for large-scale deployments.

Experimental Evaluation

The proposed policies were tested through extensive numerical simulations across a variety of synthetic scenarios. The experimental design focused on three key variables:

  • System Size: Simulations ranged from 5 to 100 parallel queues to test scalability.
  • Traffic Intensity: The algorithms were subjected to "Light" traffic (70-95% utilization) and "Heavy" traffic (exceeding 99% utilization) to observe behavior under stress.
  • Constraint Diversity: The researchers modeled both link capacity (bandwidth) limits and state-dependent gain functions (minimum utilization requirements).

Key Insights and Results

The Primacy of Online Safety

In many machine learning contexts, algorithms are permitted to "fail fast" to learn optimal boundaries. However, in infrastructure management, a single violation can lead to catastrophic failure. The proposed CMDP framework ensures "online safety," meaning constraints are respected throughout the learning and execution phases, not just in the steady state.

Performance vs. Safety Trade-offs

While the unconstrained JSED baseline consistently achieved the lowest system occupancy, it frequently violated safety constraints, particularly under heavy traffic. In contrast, JSVED, JSED-k, and JSSQ all successfully remained within safety boundaries. Among the safe policies, JSSQ and JSED-k significantly outperformed the conservative JSVED, maintaining a performance profile much closer to the theoretical optimal.

Scalability and Efficiency

The simulations revealed that JSSQ is the most practical choice for large systems. While JSED-k performs well in small clusters, its exponential memory growth under heavy loads makes it untenable for massive datacenters. JSSQ avoids this overhead by using Jensen’s Inequality to prove that average-state approximations remain safe even for complex, nonlinear constraints.

Conclusion and Future Work

This research demonstrates that it is possible to design load-balancing policies that are both high-performing and provably safe. JSSQ, in particular, offers a scalable path forward for constrained distributed systems.

However, several challenges remain. The current model assumes the dispatcher has instantaneous access to the state of every queue. In geographically distributed systems, information delay (stale data) could impact the safety guarantees of these policies. Future work will focus on refining JSSQ to handle sampling delays and integrating fast approximation methods for Lagrange multipliers to further close the gap between heuristic performance and theoretical optimality.

Summary updated

BibTeX
@inproceedings{fox2025performing,
  author = {Andrea Fox and Francesco De Pellegrini and Eitan Altman and Arnob Ghosh and Ness B. Shroff},
  title = {{Performing Load Balancing under Constraints}},
  booktitle = {WiOpt},
  year = {2025},
  doi = {10.23919/wiopt66569.2025.11123242},
}
Figure