argoproj / argo-workflows

Workflow Engine for Kubernetes
https://argo-workflows.readthedocs.io/
Apache License 2.0
14.56k stars 3.12k forks source link

Allow staggering of cron workflows with identical schedules #5956

Open boonware opened 3 years ago

boonware commented 3 years ago

Summary

Allow cron workflow schedules to be set up in such a way that multiple workflows with identical schedules don't all start at the exact same time. This will prevent sudden surge in loads. Jenkins supports this feature, see here for a description.

Use Cases

The controller could use this mechanism to stagger the launching of each workflow by a few seconds/minutes if there are cron workflows configured with identical schedules, for example, run once per day at 9 am.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

tooptoop4 commented 1 year ago

thunderingherd

sarabala1979 commented 1 year ago

@boonware @tooptoop4 you can use semaphore/mutex to controller the parallel workflow execution on each namespace. if you want to control the whole cluster level, you can configure the parallelism in the controller config map.