Abstract
Most online service providers deploy their own data stream processing systems in the cloud to conduct large-scale and real-time data analytics. However, such systems, e.g., Apache Heron, often adopt naive scheduling schemes to distribute data streams (in the units of tuples) among processing instances, which may result in workload imbalance and system disruption. Hence, there still exists a mismatch between the temporal variations of data streams and such inflexible scheduling scheme designs. Besides, the fundamental benefits of predictive scheduling to data stream processing systems also remain unexplored. In this paper, we focus on the problem of tuple scheduling with predictive service in Apache Heron. With a careful choice in the granularity of system modeling and decision making, we formulate the problem as a stochastic network optimization problem and propose POTUS, an online predictive scheduling scheme that aims to minimize the response time of data stream processing by steering data streams in a distributed fashion. Theoretical analysis and simulation results show that POTUS achieves an ultra-low response time with queue stability guarantee. Moreover, POTUS only requires mild-value of future information to effectively reduce the response time, even with mis-prediction.
1. Introduction
Modern internet giants like Twitter and Facebook rely on Data Stream Processing (DSP) systems to analyze billions of events in real-time. These systems, such as Apache Heron, typically organize applications as Directed Acyclic Graphs (DAGs), where data "tuples" flow between processing instances. The primary challenge in these environments is workload imbalance. Current scheduling methods are often "naive"—distributing data uniformly or using simple back-pressure. These methods ignore temporal traffic fluctuations and heterogeneous server capacities, leading to "hot spots" and latency spikes.
The mismatch between temporal variations in data streams and inflexible scheduling designs necessitates a more dynamic approach. While predictive scheduling has been explored in other domains, its fundamental benefits for DSP systems have remained largely unexplored until now.
2. System Architecture and Methods
The authors propose POTUS (Predictive Online Tuple Scheduling), which integrates stochastic network optimization with predictive analytics. The architecture is designed to be distributed, avoiding the bottlenecks of centralized controllers.
As illustrated in Figure 1, the system consists of multiple servers hosting containers, which in turn run processing instances. The "Stream Managers" are responsible for the scheduling and processing of arrivals (λ(t)) within specific time slots. POTUS leverages several key innovations:
- Stochastic Network Optimization & Lyapunov Techniques: The scheduling problem is formulated to minimize long-term communication costs while ensuring "queue stability." Lyapunov optimization allows the system to make independent, real-time decisions at every time slot based on current queue states and predicted arrivals.
- Predictive Pre-service: A core innovation of POTUS is the use of a "lookahead window." By predicting a surge of tuples, the system can "pre-admit" and "pre-serve" them. This proactive routing smooths out traffic spikes that would otherwise overwhelm the system.
- Distributed Decision Making: Scheduling decisions are decentralized. Stream Managers within each container handle routing locally, which allows the system to scale effectively with the number of processing nodes.
As shown in Figure 3, the lookahead window (W) allows the system to categorize tuples into three states: arriving but untreated (black), pre-served before arrival (white), and yet-to-arrive (grey). This granularity enables the scheduler to proactively route data based on anticipated demand.
3. Experimental Evaluation
The researchers evaluated POTUS using a combination of:
- Trace-driven Simulations: Real-world tuple arrival measurements from large-scale network systems were used to ensure realistic traffic patterns.
- Synthetic Workloads: Poisson-distributed traffic provided a baseline for comparison.
- Network Topologies: Simulations were conducted on standard data center architectures, specifically Jellyfish and Fat-Tree topologies, hosting five different DSP applications with varying depths and complexities.
4. Key Insights and Results
- The Power of "Mild" Future Information: One of the most striking findings is that a very small lookahead window—just a few milliseconds or time slots—is sufficient to capture the majority of latency-reduction benefits.
- Tunable Performance (The V-Parameter): The algorithm includes a tunable parameter, V. A high V prioritizes low communication costs (keeping data on the same server), while a low V prioritizes queue stability (spreading data out). This provides operators with a "knob" to tune system behavior according to specific needs.
- Robustness to Prediction Errors: Real-world predictions are rarely perfect. POTUS was tested against "mis-predictions" (false alarms and missed arrivals) and found to significantly outperform non-predictive scheduling even when using standard filters like Kalman filters.
- Performance Gains: In trace-driven tests, POTUS reduced average response times from 31.4ms to as low as 0.5ms. It also achieved up to a 7.6% reduction in communication costs compared to Heron’s default "Shuffle" scheduling.
- Stability Guarantee: The authors provided a formal proof (Theorem 1) showing that POTUS guarantees system stability, ensuring that buffers do not overflow as long as the hardware has the capacity to handle the average load.
5. Conclusion and Future Work
POTUS demonstrates that predictive scheduling can drastically improve the performance and stability of data stream processing systems. While the current implementation focuses on Apache Heron, the logic is adaptable to other frameworks like Apache Flink or Spark Streaming. Future research could investigate the computational overhead of the prediction models themselves and explore performance in even more heterogeneous hardware environments.
Summary updated