Condividi tramite


Logic Apps Performance with Service Bus

In this post, we will measure the throughput for Logic App to consume messages from a Service Bus queue using the Service Bus connector.

Single message trigger

Let’s create a new Logic App with the just the trigger “When a message is received in a queue (auto-complete)” provided by the Service Bus connector.

single-message-trigger

We pre-populated the queue with 10,000 messages. It takes 25.5 minutes for the Logic App to drain all messages from the queue, i.e. at the rate of 6.5 messages per second.

Batch messages trigger

Now let’s create another Logic App with the batch trigger “When one or more messages arrive in a queue (auto-complete)”. The trigger configuration are as follows –

  1. Maximum message count – starting from 5 going up to 175 (max limit) across test runs
  2. Polling frequency – 30 seconds

batch-messages-trigger

Again, we pre-populated the queue with 10,000 messages. It takes just 6 minutes with batch size of 5 for the Logic App to drain all messages from the queue, i.e. at the rate of 27.5 messages per second. As we increase the batch size to the maximum allowed value of 175, the throughput goes up to 400 messages per second.

batch-size-vs-throughput

Competing consumers

We can further increase the overall throughput with multiple Logic Apps (competing consumers scenario). Let’s create 10 Logic Apps with batch size of 175. We pre-populated the queue with 100K messages, i.e. 10 times more than previous runs to give enough time for competing logic apps to consume enough messages. It takes just 71 seconds for these Logic Apps to drain all messages from the queue, i.e. at the overall rate of 1408 messages per second.

competing-consumers

We should be able to scale further by adding more competing Logic Apps.

Summary

Here’s the result summary of various runs.

results-summary

Comments

  • Anonymous
    May 05, 2017
    Thanks for the comparison Vinay. Could you describe a bit about how LA instances relate to batching here? With each batch pull is it just a single LA instance processing the batch in a loop or is a unique LA instance created for each message in the batch? Put another way is debatching happening between the trigger and the rest of the LA or within the LA flow?Wrt to competing consumers, do you have to explicitly clone your LA 10 times into unique named definitions or is there a way to tell the platform you want 10 of a single definition?Thanks!
    • Anonymous
      July 17, 2017
      The default mode for Logic apps in auto-debatch messages which results into a unique LA instance per message.Yes, when we have competing consumers its multiple cloned LA definitions.