Introduction
Complex Event Processing (CEP) systems are critical for monitoring continuous data streams to detect complex temporal patterns. However, these systems frequently face bursty traffic that exceeds their CPU or memory capacities. When the event arrival rate outpaces system resources, the engine must "shed" or drop events. This paper formalizes the CEP load shedding problem, aiming to maximize query utility under strict resource constraints through a suite of approximation algorithms.
The Load Shedding Challenge
Unlike traditional stream processing, which often focuses on simple aggregates, CEP involves multi-relational, non-equi-joins over time windows. Dropping a single event can have cascading effects because that event might be a constituent part of multiple overlapping query patterns. The core challenge lies in deciding exactly which events or queries to drop to maximize the "utility" (the real-world importance) of the surviving results while respecting hardware limits.
Problem Formulation and Methods
The authors categorize the CEP load shedding problem into six distinct variants based on the resource bottleneck and the shedding mechanism employed.
The two primary dimensions are:
- Resource Bottleneck: Whether the system is limited by memory (to store events for windowed joins), CPU (to compute matches), or both (Dual-bound).
- Shedding Mechanism: Integral shedding involves binary decisions (keep or drop all events of a type), while Fractional shedding uses sampling probabilities to drop a percentage of events.
Due to the mathematical impossibility of achieving a meaningful competitive ratio in a purely online setting against adversarial inputs, the authors focus on optimizing expected utility based on statistical event arrival rates. They employ Linear Programming (LP) relaxations and rounding techniques to derive algorithms with provable performance bounds.
Key Theoretical Insights
The research reveals several fundamental properties of CEP load shedding:
- Online Guarantees are Impossible: No online algorithm can guarantee a strict competitive ratio because an adversary can withhold matching events for any kept event. Systems must rely on arrival rate statistics for smart shedding.
- CPU vs. Memory Complexity: CPU-bound shedding is relatively straightforward, mapping closely to the Knapsack problem. Memory-bound shedding is significantly harder because the utility of keeping an event depends on the arrival of all other events in its query pattern within a specific time window.
- Non-Concavity of Fractional Shedding: Even when relaxing binary decisions to continuous probabilities (FMLS), the optimization problem remains NP-hard and non-concave.
Algorithmic Results
The paper provides a suite of approximation algorithms for the various models. While many variants are NP-hard, the authors establish theoretical bounds for their performance, including bi-criteria and tri-criteria approximations.
Key results include:
- Memory-Bound (IMLS): A bi-criteria approximation algorithm that balances utility loss against memory budget violations.
- CPU-Bound (ICLS): Admits a Fully Polynomial Time Approximation Scheme (FPTAS), while the fractional version (FCLS) can be solved exactly in polynomial time.
- Dual-Bound (IDLS): A tri-criteria approximation that simultaneously considers utility loss, memory usage, and CPU usage.
Conclusion and Future Directions
This work provides a rigorous theoretical foundation for load shedding in CEP. Future research may explore more complex utility functions, such as submodular functions to model diminishing returns, or extend the models to handle advanced CEP features like negation and Kleene closures. Additionally, the non-convex nature of Fractional Dual-Bound (FDLS) shedding remains a challenging area for further optimization.
Summary updated