Introduction
Distributed Stream Data Processing Systems (DSDPSs), such as Apache Storm, are essential for handling massive, unbounded data streams in real-time. A fundamental challenge in these systems is the scheduling problem: determining which worker machine should execute specific processing tasks.
Traditional systems often rely on simple "round-robin" heuristics, which distribute tasks evenly but fail to account for communication delays between machines. Conversely, "model-based" approaches attempt to predict latency using queuing theory or regression. However, these models often struggle with the complexity and non-linearity of real-world distributed environments. This paper proposes a model-free control framework that leverages Deep Reinforcement Learning (DRL) to optimize task scheduling by learning directly from system experience.
System Architecture
The proposed framework integrates a DRL-based control unit with a standard DSDPS. As illustrated in the architecture below, the system is divided into two primary layers: the DSDPS layer (e.g., Apache Storm) and the DRL-based control layer.
In this setup, the DRL agent acts as a custom scheduler within the master node (Nimbus in Storm). It observes the system state—defined by the current scheduling configuration and the input workload—and receives a reward signal based on the negative average processing latency. By interacting with the environment through a socket-based interface, the agent iteratively refines its scheduling policy to minimize tuple processing time.
DRL-based Scheduling Mechanism
Scheduling in DSDPSs involves an exponentially large, discrete action space, which poses a significant challenge for standard Deep Q-Networks (DQN). To address this, the authors employ an Actor-Critic architecture inspired by Deep Deterministic Policy Gradient (DDPG).
As shown in the figure above, the process follows these steps:
- Actor Network: Outputs a "proto-action" $\hat{a}$, which is a continuous representation of a potential schedule.
- Optimizer: To bridge the gap between continuous outputs and discrete requirements, an Optimizer solves a Mixed-Integer Quadratic Programming (MIQP) problem. This finds the $K$-Nearest Neighbors (K-NN) of the proto-action that represent valid, discrete task assignments.
- Critic Network: Evaluates these $K$ candidate schedules to select the one that maximizes the expected reward (minimizes latency).
This hybrid approach allows the agent to navigate high-dimensional action spaces efficiently while ensuring that every chosen action is a valid system configuration.
Experimental Evaluation
The framework was evaluated on a cluster of 11 IBM blade servers using three representative Apache Storm topologies: Continuous Queries, Log Stream Processing, and Word Count. These benchmarks were tested at various scales using real-world data sources, such as university server logs.
Key Results
- Latency Performance: The DRL-based method reduced average tuple processing latency by 31.4% to 45.2% compared to the default Storm scheduler and by 9% to 21.3% compared to state-of-the-art model-based methods.
- Scalability and Robustness: The performance advantage of the DRL agent became more pronounced as the system scale increased. Furthermore, the agent demonstrated high robustness; when the workload suddenly spiked by 50%, the DRL agent quickly re-stabilized the system, whereas model-based approaches struggled with the increased non-linearity.
- Practicality: The agent reached high-quality solutions within a few hundred decision epochs, making it suitable for online deployment. However, the authors noted that the system requires approximately 8–10 minutes to stabilize after a new schedule is deployed, which dictates the frequency of scheduling updates.
Conclusion
This research demonstrates that model-free DRL can significantly outperform traditional and model-based scheduling methods in complex distributed environments. By utilizing an Actor-Critic architecture with an MIQP-based discrete mapping, the framework effectively manages the massive action spaces inherent in DSDPS scheduling. Future work may explore applying this model-free control to other distributed challenges, such as dynamic resource scaling and power management.
Summary updated