Skip to content
BENIBIX Learn

Tumbling Window vs Sliding Window

People think any window that comes round again is a tumbling window. Tumbling windows touch but never overlap, so each event is counted once. Sliding windows overlap, so one event falls in more than one. Use tumbling for totals and bills. Use sliding for moving averages and alerts.

Data⚙️ Processing

Tumbling Window

Windows that are all one size. Each starts when the last ends.

A tumbling window is a window of fixed size that never overlaps the next one. Each event falls into exactly one window. A 5-minute tumbling window gives one result for 10:00 to 10:05, then one for 10:05 to 10:10, and so on. It is the simplest window and the most common.

Example
A power company adds up use in 15-minute windows. Its bills are based on those same blocks.
Why it matters
Each event is counted once, so the windows add up to the whole. Reports and bills need that.
Full entry
Data⚙️ Processing

Sliding Window

Windows of one size that overlap. Each step gives a new result.

A sliding window has a fixed size, but a new one starts at a shorter step. So the windows overlap. A 10-minute window that slides every minute gives a fresh 10-minute result each minute. One event falls into several windows. It is used for moving averages and for alerts on the last few minutes. Some tools call it a hopping window.

Example
A site alerts when errors in the last 10 minutes pass 100. The check runs every minute on a sliding window.
Why it matters
It smooths out spikes and still updates often. Most live alerts and moving averages use it.
Full entry

In one line

Tumbling Window
Windows that are all one size. Each starts when the last ends.
Sliding Window
Windows of one size that overlap. Each step gives a new result.