1

I am working something that utilizes the azure services & azure functions(with sb trigger), and trying to figure out if it matters to distribute the messages by creating multiple subscriptions VS Just one?

Please see the Before VS After in below chart: enter image description here

I am trying to improve the performance of entire process as there are too many messages sitting in there. There's no difference between the 3 functions in the After chart, all they do is upserting DB records. Does it even matter if I have 1 sub vs 3 sub in this flow ?

Bmm
  • 11
  • 2
  • Hi Bmm, before trying to get you an answer on your question, may I ask for some context first ? What is your scenario ? Why do you have so many messages to handle ? Is it some kind of telemetry data that you need to handle ? Are you sure ServiceBus is the proper way to handle your stream of data ? – Julien Oct 30 '22 at 21:53
  • Hi @Julien, it is from legacy design, the messages could be from bulk load or batches, about 100k per day. – Bmm Oct 31 '22 at 01:54

2 Answers2

0

Best Practices for performance improvements using Service Bus Messaging, can be found here: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-performance-improvements?tabs=net-standard-sdk-2

In your design it looks like writing to the database is going to be the bottleneck. So I would start with a single subscription.

Shiraz Bhaiji
  • 64,065
  • 34
  • 143
  • 252
0

Please try the approach of Fan-in/Fan-out pattern with Azure Durable function

find the below use case for your reference.

https://madeofstrings.com/2019/01/09/scaling-azure-functions-to-make-500000-requests-to-weather-com-in-under-3-minutes/

https://ajitpatra.com/2020/01/15/using-service-bus-triggered-azure-durable-function-with-d365-ce/

Vino
  • 21
  • 3
  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 05 '22 at 16:14