We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
2 system design questions lean on this idea. Each walks through the full answer.
System Design Masterclass · Stream Batch Processing
Free preview: the first 2 parts of this 6-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Stream Batch Processing
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
Hopping windows advance at fixed intervals. Tumbling windows fire once per bucket. Sliding windows fire on every arriving event, continuously recalculating an aggregate over the most recent N events or T time units. That sounds expensive because it is. The entire engineering story of sliding windows is making the per event cost O(1) instead of O(window_size).
Netflix monitors quality of experience per pop using a 10 minute sliding window updated every 10 seconds. If a pop's rebuffer ratio spikes, the control plane reroutes traffic to a healthy pop. That 10 second refresh means a degradation is caught within 10 seconds of crossing the threshold, not after 10 minutes. For a service that streams to 200 million subscribers, those 10 seconds of faster detection translate directly into fewer playback interruptions.
The reason sliding windows exist separately from hopping windows is the continuous output. A hopping window fires once per hop. A sliding window fires on every event (or on every slide interval, depending on the framework). For anomaly detection, fraud scoring, and quality monitoring, the difference matters: you detect a threshold crossing as soon as it happens rather than waiting for the next hop.
By the end of this lesson you will understand the naive versus pane based implementation, why the naive version melts under load, and how pane state turns sliding windows from a theoretical concept into a production pattern.
The difference between a sliding window that works and one that collapses under load comes down to one architectural decision: do you rescan the buffer on every event, or do you maintain partial aggregates per pane?
It is easy and good
“It is really nice and good Please join the course”