flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: Access Sliding window
Date Mon, 31 Jul 2017 06:58:55 GMT

I would first compute the 15 minute counts. Based on these counts, you
compute the threshold by computing average and std-dev and then you compare
the counts with the threshold.
In pseudo code this could look as follows:

DataStream requests = ...
DataStream counts = requests.timeWindow(15 mins).reduce(// count requests)
DataStream thresholds = counts.timeWindow(15 mins, 6 hours).apply(//
compute every 15 mins average and std-dev over 6 hours)
DataStream alerts = counts.connect(thresholds).process(// stateful
CoProcessFunction that compares thresholds with counts)

Hope this helps,

2017-07-28 18:31 GMT+02:00 Raj Kumar <smallthings1992@gmail.com>:

> Hi,
> I am using a sliding window to monitor server performance. I need to keep
> track of number of HTTP requests generated and alert the user when the
> requests gets too high(Sliding window of 6 hours which slides every
> 15mins).
> Aggregate count of the number of http requests is evaluated in the 15mins
> sliding window. I need to keep track of running average of these aggregate
> count over the different sliding window of 15mins to create an alert when
> the load is over the average+1std deviation.
> How can we achieve this ? How can we keep track of running average for the
> all the sliding windows ?
> P
> --
> View this message in context: http://apache-flink-user-
> mailing-list-archive.2336050.n4.nabble.com/Access-Sliding-
> window-tp14519.html
> Sent from the Apache Flink User Mailing List archive. mailing list archive
> at Nabble.com.

View raw message