A number of weeks in the past, we introduced the Public Preview Refresh launch of Logic Apps hybrid deployment mannequin that enables prospects to run Logic Apps workloads on a buyer managed infrastructure.
This mannequin gives the pliability to execute workflows, both on-premises or in any cloud atmosphere, thereby providing enhanced management over the operation of logic apps. By using customer-managed infrastructure, organizations can adhere to regulatory compliance necessities and optimize efficiency in line with their particular wants.
As prospects contemplate leveraging hybrid environments, understanding the efficiency of logic apps beneath varied configurations and eventualities turns into important.
This doc affords an in-depth efficiency analysis of Azure Logic Apps inside a hybrid deployment framework. It examines, a number of key elements corresponding to CPU and reminiscence allocation and scaling mechanisms, offering invaluable insights geared toward maximizing the appliance’s effectivity and efficiency.
On this part, we are going to discover the important thing points that have an effect on Logic Apps efficiency when deployed in a hybrid atmosphere. Elements such because the underlying infrastructure of the Kubernetes atmosphere, SQL configuration and scaling configuration can considerably influence the effectivity of workflows and the general efficiency of the functions.
The next weblog entry gives particulars of the scaling mechanism of Hybrid deployment mannequin – Scaling mechanism in hybrid deployment mannequin for Azure Logic Apps Normal | Microsoft Neighborhood Hub
If you create a Logic App, a default worth of 0.5 vCPU and 1GiB of reminiscence could be allotted. From the Azure Portal, you’ll be able to modify this allocation from the Container blade. – Create Normal logic app workflows for hybrid deployment – Azure Logic Apps | Microsoft Study
Presently, the utmost allocation is ready to 2vCPU and 4 GiB reminiscence per app. Sooner or later, there could be a provision made to decide on greater allocations.
For CPU intense/reminiscence intense processing like customized code executions, choose a better worth for these parameters. Within the subsequent part, we shall be evaluating the efficiency with completely different values of the CPU and reminiscence allocation.
This allocation would influence the billing calculation of the Logic App useful resource. Refer vCPU calculation for extra particulars on the billing influence.
Kubernetes runs software workloads by putting containers into Pods to run on Nodes. A node could also be a digital or bodily machine, relying on the cluster.
A node pool is a gaggle of nodes that share the identical configuration (CPU, Reminiscence, Networking, OS, most variety of pods, and so forth.). You may select the capability (cores and reminiscence), minimal node depend and most node depend for every node pool of the Kubernetes cluster. We advocate allocating a better capability for processing CPU intense, or reminiscence intense functions
For a Logic App useful resource, we advocate you configure the utmost and minimal replicas which could possibly be scaled out when a scale occasion happens. The next worth for the max replicas helps in sudden spikes within the variety of software requests.
The interval with which the scaler checks for the scaling occasion and the cooldown interval for the scaling occasion can be configured from the Scale blade of Logic Apps useful resource. These parameters influence the scaling sample.
The hybrid deployment mannequin makes use of Microsoft SQL for runtime storage. As such, there are lot of SQL operations carried out all through the execution of the workflow and SQL capability has a major influence on the efficiency of the app.
Microsoft SQL server might both be a SQL server on Home windows, or an Azure SQL database.
Few suggestions on the SQL configuration for higher efficiency:
- In case you are utilizing, Azure SQL database, run it on a SQL elastic pool.
- In case you are utilizing SQL server on Home windows, run with not less than 4vCPU configuration.
- Scale out the SQL server as soon as the CPU utilization of the SQL server hits 60-70% of the entire obtainable CPU.
For this efficiency evaluation train, we have now used a typical enterprise integration situation which incorporates the under parts.
- Information transformation: XSLT transformation, validation, and XML parsing actions
- Information routing: File system connector for storing the reworked content material in a file share.
- Message queuing: RabbitMQ connector for sending the transformation outcome to Rabbit MQ queue endpoint.
- Management operations: For-each loop for looping via a number of information, situation execution, Scope, and error dealing with blocks.
- Request response: The XML information transmitted by way of HTTP request, and the standing returned as a response.
For these assessments, we used the next atmosphere settings:
Kubernetes cluster: AKS cluster with Normal D2sV3 (2vCPU, 8GiBmemory)
Max replicas: 20
Cooldown interval: 300 seconds
Polling interval: 30
With the above atmosphere and settings, we have now carried out a number of software assessments with completely different configuration of SQL server, useful resource allocation and take a look at durations utilizing Azure load testing software.
Within the following desk, we have now summarized the response time, throughput, and the entire vCPU consumption for every of those configurations. You may verify every situation for detailed data.
Configuration |
Outcomes |
||||||
State of affairs |
SQL |
CPU and Reminiscence allocation per Logic App |
Check length |
Load |
90th Percentile Response time |
Throughput |
Whole vCPU consumed |
State of affairs 1 |
SQL normal function V2 |
1vCPU/2GiB Reminiscence |
10 minutes with 50 customers |
503 requests |
68.62 seconds |
0.84/s |
3.42 |
State of affairs 2 |
SQL Elastic pool-4000DTU |
1vCPU/2GiB Reminiscence |
10 minutes with 50 customers |
1004 requests |
40.74 seconds |
1.65/s |
3 |
State of affairs 3 |
SQL Elastic pool-4000DTU |
2vCPU/4GiB Reminiscence |
10 minutes with 50 customers |
997 requests |
40.63 seconds |
1.66/s |
4 |
State of affairs 4 |
SQL Elastic pool-4000DTU |
2vCPU/4GiB Reminiscence |
half-hour with 50 customers |
3421 requests |
26.6Seconds |
1.9/s |
18.6 |
State of affairs 5 |
SQL Elastic pool-4000DTU |
0.5vCPU/1GiB Reminiscence |
half-hour with 50 customers |
3055 requests |
31.38 seconds |
1.7/s |
12.4 |
State of affairs 6 |
SQL 2022 Enterprise on Normal D4s V3 VM |
0.5vCPU/1GiB Reminiscence |
half-hour with 50 customers |
4105 requests |
27.15 seconds |
2.28/s |
10 |
On this situation, we carried out a load take a look at for 10 minutes with 50 customers with the Logic App configuration of: 1 vCPU and a couple of GiB Reminiscence and Azure SQL database working on Basic function V2 plan.
There have been 503 requests with a number of information in every payload and it achieved the 68.62 seconds because the 90th percentile response time and a throughput of 0.84 requests per second.
Scaling:
The Kubernetes nodes scaled out to 12 nodes and in complete 3.42 vCPUs utilized by the app for the take a look at length.
SQL Metrics:
The CPU utilization of the SQL server reached 90% of CPU utilization fairly early and stayed above 90% for the remaining length of the take a look at. From our backend telemetry as effectively, we noticed that the actions executions had been sooner, however there was latency between the actions, which signifies SQL bottlenecks.
On this situation, we carried out a load take a look at for 10 minutes with 50 customers with the Logic App configuration of: 1 vCPU and a couple of GiB Reminiscence and Azure SQL database working on a SQL elastic pool with 4000 DTU.
There have been 1004 requests with a number of information in every payload and it achieved the 40.74 seconds because the 90th percentile response time and a throughput of 1.65 requests per second.
Scaling:
The Kubernetes nodes scaled out to 15 nodes and in complete 3 vCPUs utilized by the app for the take a look at length.
SQL Metrics:
The SQL server’s CPU utilization peaked to 2% of the elastic pool.
On this situation, we carried out a load take a look at for 10 minutes with 50 customers with the Logic App configuration of 2 vCPU and 4 GiB Reminiscence and Azure SQL database working on a SQL elastic pool with 4000 DTU.
There have been 997 requests with a number of information in every payload and it achieved the 40.63 seconds because the 90th percentile response time and a throughput of 1.66 requests per second.
Scaling:
The Kubernetes nodes scaled out to 21 nodes and in complete 4 vCPUs utilized by the app for the take a look at length.
SQL Metrics:
The SQL server’s CPU utilization peaked to five% of the elastic pool.
On this situation, we carried out a load take a look at for half-hour with 50 customers with the Logic App configuration of: 2 vCPU and 4 GiB Reminiscence and Azure SQL database working on a SQL elastic pool with 4000 DTU.
There have been 3421 requests with a number of information in every payload and it achieved the 26.67 seconds because the 90th percentile response time and a throughput of 1.90 requests per second.
Scaling:
The Kubernetes nodes scaled out to 20 nodes and in complete 18.6 vCPUs utilized by the app for the take a look at length.
SQL Metrics:
The SQL server’s CPU utilization peaked to 4.7% of the elastic pool.
On this situation, we have now carried out a load take a look at for half-hour with 50 customers with the Logic App configuration of 0.5 vCPU and 1 GiB Reminiscence and Azure SQL database working on a SQL elastic pool with 4000 DTU.
There have been 3055 requests with a number of information in every payload and it achieved the 31.38 seconds because the 90th percentile response time and a throughput of 1.70 requests per second.
Scaling:
The Kubernetes nodes scaled out to 18 nodes and in complete 12.4 vCPUs utilized by the app for the take a look at length.
SQL Metrics:
The SQL server’s CPU utilization peaked to 8.6% of the elastic pool CPU.
On this situation, we carried out a load take a look at for half-hour with 50 customers with the Logic App configuration of: 0.5 vCPU and 1 GiB Reminiscence and Azure SQL database working on an on-premises SQL 2022 Enterprise Gen2 model working on a Home windows 2022 OS with Normal D4s v3 picture (4 vCPU and 16GIB reminiscence)
There have been 4105 requests with a number of information in every payload and it achieved the 27.15 seconds because the 90th percentile response time and a throughput of 2.28 requests per second.
Scaling:
The Kubernetes nodes scaled out to 8 nodes and in complete 10 vCPUs utilized by the app for the take a look at length.
SQL metrics:
The CPU utilization of the SQL server went above 90% after jiffy and there was latency on few runs.
The next are the findings and suggestions for this efficiency train. Think about that this load take a look at was carried out utilizing distinctive situations. For those who conduct the same take a look at, the outcomes and findings would possibly differ, relying on elements corresponding to workflow complexity, configuration, useful resource allocation and community configuration.
- The KEDA scaler performs the scale-out and scale-in operations sooner, as such, whereas the entire vCPU utilization stays fairly low, although the nodes scaled out within the vary of 1-20 nodes.
- The SQL configuration performs an important position in lowering the latency between the motion executions. For a passable load take a look at, we advocate beginning with not less than 4vCPU configuration on SQL server and scale out as soon as CPU utilization of the SQL server hits 60-70% of the entire obtainable CPU.
- For important functions, we advocate having a devoted SQL database for higher efficiency.
- Rising the devoted vCPU allocation of the Logic App useful resource is useful for the SAP connector, Guidelines Engine, .NET Framework based mostly customized code operations and for the functions with many advanced workflows.
- As a normal suggestion, repeatedly monitor efficiency metrics and regulate configurations to fulfill evolving necessities and comply with the coding greatest practices of Logic Apps normal. Think about reviewing the next article, for suggestions to optimize your Azure Logic Apps workloads: https://techcommunity.microsoft.com/weblog/integrationsonazureblog/logic-apps-standard-hosting–performance-tips/3956971