3

I am trying to do cost calculation for the azure service bus premium tier. I could not found the answer to the following simple questions

  • What max message rate a single message unit can support
  • What max throughput(data size/sec) a single message unit can support
vashishth
  • 2,751
  • 4
  • 38
  • 68

1 Answers1

3

Service bus premium messaging does not impose message limit in terms of number in that way (except 1 message can be of max 1 MB, and queue/topic max size 80 GB). It acts more like a compute resource. Based on metrics, you should decide on scale up/down or use auto-scaling feature it has.

There are a number of factors to take into consideration when deciding the number of messaging units for your architecture:

  • Start with 1 or 2 messaging units allocated to your namespace.
  • Study the CPU usage metrics within the Resource usage metrics for your namespace.
  • If CPU usage is below 20%, you might be able to scale down the number of messaging units allocated to your namespace.
  • If CPU usage is above 70%, your application will benefit from scaling up the number of messaging units allocated to your namespace.

To learn how to configure a Service Bus namespace to automatically scale (increase or decrease messaging units), see Automatically update messaging units.

For more details, refer this and this.

krishg
  • 5,935
  • 2
  • 12
  • 19
  • For premium, max queue/topic size can be 5 GB, since the partitioning is not supported for Premium. Every resource has limitations. There must be some limit on the message rate for certain throughput. – vashishth Oct 11 '20 at 12:17
  • "In the Premium SKU, and the Standard SKU with partitioning enabled, the maximum queue or topic size is 80 GB." - May be the statement is bit complex, but it means for premium (non-partitioned only), it's 80 GB (like partitioned standard SKU). – krishg Oct 11 '20 at 13:24
  • And regarding message rate, there is none in premium. By design, premium is meant to be of fixed pricing and scalable based on performance, not like standard which is charged based on messages (pay-as-you-go). – krishg Oct 11 '20 at 13:28
  • I am hoping if someone has done a performance test. – vashishth Oct 11 '20 at 15:24
  • 1
    Personally, I had worked in a high throughput production system where we had achieved upto ~100K messages / minute with 8 messaging units with max 50% cpu usage (so yet to push the limit). We had scaled up to 8 MU to be on little safer on our scenario since it was in production. While it was bit extreme high in my case, roughly you can easily achieve 20K / minute with 1 MU. Again, you have to test in your scenario to get exact number since there are many factors which can impact this. – krishg Oct 11 '20 at 20:21
  • Regarding queue/topic max size, you can do a quick check yourself. It's 80 GB. https://pasteboard.co/JvcyxS4.png – krishg Oct 11 '20 at 20:55
  • @krishg I would love more details about how you optimize for performance! Currently struggling with 4-8MUs where we have issues with throttling (on Premium) and CPU/Memory not super high either. – Joel Jun 10 '21 at 12:58
  • perhaps this helps: https://techcommunity.microsoft.com/t5/messaging-on-azure-blog/premium-messaging-how-fast-is-it/ba-p/370722 – marek_lani Jan 04 '22 at 11:46
  • "Might be able to scale down". Why wouldn't you be able to? It says you can have 1000 entities per messaging unit as well as a fixed storage capacity of 1TB per unit. So what if you have 1001 entities? Can you no longer scale down below 2 units? What if you have 1.1TB of messages in the queues because they backed up, do you have to delete some of them in order to scale down? How is the data distributed... if you bring it under 1TB and some data was on messaging unit 2, will it binpack the data and move it into the other unit? It's very unclear how scaling works and how it affects these limits. – Triynko Mar 15 '22 at 04:19