Concurrency Control & Degree of Parallelism in Power Automate

This blog will help you understand what is Concurrency Control & Degree of Parallelism in Power Automate.

We will understand how we can enable concurrency control on the “trigger” and on “Apply to each” Action in Power Automate.

What is Concurrency Control for Trigger?

  • We can control the concurrent(parallel) run of our flow using concurrency control.
  • By enabling this feature we can limit the highest number of flow runs that can run at the same time, or in parallel.
  • If we don’t enable this feature our flow will run concurrently by default. (unlimited)
  • It cannot be undone once enabled.

Concurrency Control in Trigger

Scenario 1: If Concurrency control is not enable on trigger and we run the flow.

  • The flow will run concurrently(parallelly)
  • You can see below our flow has multiple runs at the same time. (there is no limit)

Scenario 2 If Concurrency control is enable on trigger and we run the flow.

  • If we enable concurrency control you will notice the “Degree of Parallelism” option is visible and it has a default value of 25.
  • We can change the value of the Degree of Parallelism from 1 to 50.
  • Where 1 indicates only one flow can run at a time. once it is run successfully then only the next flow will run. (the flow will run sequentially)

Example:

  • Concurrency Control: Enabled
  • Degree of Parallelism : 3

Observations after enabling Concurrency control on trigger Action:

  • After setting Degree of Parallelism to 3 you can notice that 3 flow runs are running concurrently(parallelly)
  • And Next 2 flow runs are in waiting status. They are in queue waiting for previous runs to get completed.
  • So by using Degree of Parallelism you can control the number of flow run at the same time.

Concurrency Control in “Apply to each” Action

  • Apply to each action execute sequentially by default and if you have more than 200, 300 items to loop it will take a lot of time to execute.
  • We can change this sequential running to parallel running by enabling concurrency control.
  • If we enable concurrency control on Apply to each action then this action will execute more rapidly and our flow will take less time to run.

Observations:

Before Enabling Concurrency control on Apply to each action it took 2 minutes to execute that action.

After Enabling Concurrency control on Apply to each action it took 8 seconds to execute that action.

You can read limits of concurrency control on Microsoft document: https://docs.microsoft.com/en-us/power-automate/limits-and-config#concurrency-looping-and-debatching-limits

1 thought on “Concurrency Control & Degree of Parallelism in Power Automate”

Leave a Reply

Your email address will not be published. Required fields are marked *