Cloud performance and scalability. Azure Service Bus and Azure Durable functions - part 2
- X HI Technical Writer

- May 26, 2023
- 3 min read
I have measured the performance of the Azure durable functions for these configurations:
Creating an app service scale out plan - manual scale.
Creating an app service scale out plan - custom scale.
Configuring the durable functions parameters for the task hub.
Running it on a consumption plan.
Running it on a premium plan.
and using the following loads:
πππππ ππππ:
π·πΆ πππππππππ π‘ π·πΆ ππππππππππ π‘ π·πΆ πππππππ ππππ ππππππππ’
πΌπππππ ππππ:
π·πΆ πππππππππ π‘ π·πΆπΆ ππππππππππ π‘ π·πΆ πππππππ ππππ ππππππππ’ ππ
π·πΆπΆ πππππππππ π‘ π·πΆ ππππππππππ π‘ π·πΆ πππππππ πππ ππππππππ’
π·πππ ππππ:
π·πΆ πππππππππ π‘ π·πΆπΆπΆ ππππππππππ π‘ π·πΆ πππππππ ππππ ππππππππ’ ππ
π·πΆπΆπΆ πππππππππ π‘ π·πΆ ππππππππππ π‘ π·πΆ πππππππ πππ ππππππππ’
Automatic scaling - scale out the App Service Plan
As with all Azure Functions running in the Consumption and Elastic Premium plans, Durable Functions supports auto-scale via the Azure Functions scale controller.
The Scale Controller monitors how long messages and tasks have to wait before they are processed. Based on these latencies it can decide whether to add or remove workers.
You can read more about it here:
Scaling the number of VM instances
The app service plan can be scaled out by increasing the number of VM machines instances on which the functions executes.
The instance count slider can be set to a value between 1 to 30 for the p2v2 app service plan.
Custom scaling plan using metrics for the Azure durable function's storage account's queues
You can create a custom autoscale plan and define a number of rules for each control or worker-item queue.
Each rule will increase or decrease the VM instances count based on several metric thresholds.
The number of scaled out / in instances during processing the load.
Findings
1)
π° ππππππππ ππ‘πππππππ, πππππππ π πππ πππππππ ππππππ ππ πππ ππππ.ππππ ππππ πππ ππ πππππππ ππππ πππ πππ πππ πππππππ ππππ ππππππππ πππ ππππππ πππ πππππππ:
Consumption plan
πππππ ππππ - π·:πΉπΉππππ
ππππππ ππππ
ππππ π· (π·πΆ πππππππππ π‘ π·πΆπΆ ππππππππππ π‘ π·πΆ πππππππ) - π»:πΈπΈ ππππ
ππππ πΈ (π·πΆπΆ πππππππππ π‘ π·πΆ ππππππππππ π‘ π·πΆ πππππππ) - πΈ:π»π» ππππ
ππππ ππππ
ππππ π· - π·πΌ:πΈπΏ ππππ
ππππ πΈ - πΎ:πΆπΈ ππππ
2)
ππππ πππππππ ππ π²ππππππππππ ππππ, ππππππππππ πππ πππ‘π²ππππππππππ°πππππππ’π΅ππππππππ πππ πππ‘π²ππππππππππΎππππππππππππ΅ππππππππ ππππππ πππππ·πΆ ππ π·πΆπΆ ππ π·πΆπΆπΆ ππ πππ ππππ.ππππ ππππ, ππππ πππ πππππππ π ππππππππππππ ππ‘πππππππ ππππ πππππππππππ ππππ ππππππ’ πππ ππ πππ ππππ ππππ πππ ππππππ ππ ππππππππππ πππππππππ πππ ππππππππππ πππ πππ‘ππ (πππ πππ ππππππππ πππππππ).
3)
ππππ πππππππ ππ πππ π³ππππππππ ππ πΏππππππ πΏπππ πππππππ ππ πππ ππππππππππ ππ πππ ππππ.ππππ ππππ ππ πππππππ πππ πππ πππ πππππππ ππππ πππ πππππππππ π ππππππππππππ ππππ πππππππππππ.
π΅ππ π premium plan baseline ππ‘πππππππ ππππππ, πππππππ π πππ πππππππ ππππππ ππ πππ ππππ.ππππ ππππ πππ π ππππππ π πΌ ππππππππ, πππ πππππππ πππ π ππππ ππππ πππ ππππππ’ πππ:
πππππ ππππ : π·:πΉπ½ ππππ
ππππππ ππππ: ππππ π· - π·πΌ:πΊπ» ππππ
ππππππ ππππ: ππππ πΈ - π·πΌ:πΉπΊ ππππ
ππππ ππππ: ππππ π· - π»π»:πΉπΈ ππππ
ππππ ππππ: ππππ πΈ - πΉπΏπ» πππππππππ πππππππππ πππ ππ π·πΆπΆπΆ ππ πΌπ» ππππ
4)
ππππ πππππππ π πππ π ππππππππ πππππππππππππ - ππππππ πππππππ πππ ππ ππ π πΏππππππ πΏπππ π πππ ππππππ ππππππππππ ππππππππππ ππ πππ ππππ.ππππ - πππ πππππππ πππ ππππ ππππ ππ‘ππππ ππ’ ππ‘ππππππππππ πππππππππ πππ ππππ πππππππ, π πππππ π· ππππππ ππ ππππ πππ πππ π ππππ πππππππ (ππππ ππ, πππππππ π·πΆ πππππππππ π‘ π·πΆπΆπΆ ππππππππππ π‘ π·πΆ πππππππ ππππ ππππππππ’ ππ π·πΆπΆπΆ πππππππππ π‘ π·πΆ ππππππππππ π‘ π·πΆ πππππππ πππ ππππππππ’).
Function timeout
One of the reasons the functions needs to be well tuned and have a fast execution is because they have a limited duration span.
The whole process should run in less than 10 minutes for the Consumption Plan and less than 60 mins on the Premium Plan.
In the next article, that will be the last part of this series, I will provide a few tips recommended by Microsoft for configuring the Azure Durable functions values in the host.json file.




Comments