Does EventBridge Scheduler Flexible Time Windows work?

0

I have an EventBridge Scheduler setup to invoke a Lambda function every 20 minutes.

I have enabled Flexible Time Window with a setting of 5 minutes.

It appears when the Lambda is invoked, it is done exactly every 20 minutes without variance. It doesn't seem like Flexible Time Window is taking effect.

Am I doing somsething wrong, or does this feature not work?

asked 8 months ago639 views
2 Answers
1

Flexible time window helps in making sure that none of the event rule gets missed if there is surge in rule triggers at same point of time, AWS gets the flexibility to distribute that surge and would make sure that all the rules get triggered within their flexible time window.

With flexible time window EventBridge Scheduler invokes the task within that timeframe. This setting would help to distribute the invocations across time and manage the downstream service limits.

What is happening in your case is absolutely fine and as expected.

When you configure your schedule with a flexible time window, it invokes the target within the time window you set. For example, if you configure a 15 minute flexible time window for a schedule that runs every hour, it invokes the target within 15 minutes after the scheduled time.

So, in your case with 20 minutes of frequency, let's say next schedule is 7:40PM and you have flexible time window set as 15 minutes, then your rule would trigger the target no later than 7:55PM.

You may see variance if there is surge/spike in event rule trigger that have same scheduled time, as AWS would get flexibility to balance the load and makes sure that event rule would be triggered with the Schedule+flexible time window time. But with flexible time window you may not see variance necessarily, as there may not be enough load and AWS has bandwidth to invoke those rules on the exact schedule.

Reference:

Configuring flexible time windows

Hope this explanation helps.

Comment here if you have additional questions, happy to help.

Abhishek

profile pictureAWS
EXPERT
answered 8 months ago
0

While what you say is plausible, this is not now Amazon is advertising what this feature actually does.

For example on their blog introducing EventBridge Scheduler they have this to say about Time Windows:

Time window allows you to start a schedule within a window of time. This means that the scheduled tasks are dispersed across the time window to reduce the impact of multiple requests on downstream services.

Disperse is to spread or distribute across the time window (presumably to mitigate the thundering herd problem). It says not one iota about AWS surge or load. Infact none of the documentation talks about AWS spreading the execution over a time window due to load, and shouldn't this be the default action (to execute at the earliest possible time after the scheduled time) anyway if there is a surge in load?

answered 8 months ago
  • What you mentioned here, that's for time window. If you look at the blog post which you shared above, for flexible time window it says: "Another setting that you can configure is the flexible time window. It’s not used for this example, but if you choose a time window, EventBridge Scheduler invokes the task within that timeframe. This setting helps to distribute the invocations across time and manage the downstream service limits."

    I hope this makes sense to you based on the explanation provided. Feel free to comment if you have additional questions.

  • @secondabhi_aws - there's no other "Time Window" feature except Flexible Time Window? In that post, they say "Time Window" which I assumed to be Flexible Time Window, but if they're speaking about some other Time Window feature, how does one use or configure it?

  • Yes, you are right, why did I mention "flexible time window" was as it provided more specific explanation about this. However "time window" also says the same thing, it's no different. "Time window allows you to start a schedule within a window of time. This means that the scheduled tasks are dispersed across the time window to reduce the impact of multiple requests on downstream services."

    Let me know if you still think it's confusing and not clear.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions