Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Service Bus Scalability

I am trying to understand how can I make Azure Service Bus Topic to be scaleable to handle >10,000 requests/second from more than 50 different clients. I found this article at Microsoft - http://msdn.microsoft.com/en-us/library/windowsazure/hh528527.aspx. This provides lot of good input to scale azure service bus like creating multiple message factories, sending and receiving asynchronously, doing batch send/receive.

But all these input are from the publisher and subscriber client perspective. What if the node running the Topic can not handle the huge number of transactions? How do I monitor that? How do I have the Topic running on multiple nodes? Any input on that would be helpful.

Also wondering if any one has done any capacity testing with Topic/Queue and I am eager to see those results...

Thanks, Prasanna

like image 530
phebbar Avatar asked Aug 29 '12 08:08

phebbar


People also ask

Is Azure Service Bus scalable?

For example, you can implement the following scaling scenarios for Service Bus namespaces using the Autoscale feature. Increase messaging units for a Service Bus namespace when the CPU usage of the namespace goes above 75%.

How fast is Azure Service Bus?

Benchmarks against Service Bus queues have demonstrated that a single queue can achieve a message throughput of up to 2,000 messages per second with a message size of approximately 1 KB. To achieve higher throughput, use multiple queues.

What is Service Bus capacity?

Message size up to 256 KB. Service Bus Premium Messaging provides resource isolation at the CPU and memory level so that each customer workload runs in isolation. This resource container is called a messaging unit. Each premium namespace is allocated at least one messaging unit.

Can I send batch messages larger than 256 KB to Azure Service Bus?

The long answer. The Azure Service Bus maximum message size is 256 KB for Standard tier and 1 MB for Premium tier (https://docs.microsoft.com/azure/service-bus-messaging/service-bus-quotas). A simple solution to overcome this limitation is split the messages in blocks lower or equal to 256 KB size.


2 Answers

If you need 10K or 100K or 1M or more requests per seconds take a look at what's being done on the highway. More traffic, more lanes.

You can get effectively arbitrary flow rates out of Service Bus by partitioning your traffic across multiple entities. Service Bus gives a number of assurances about reliability, e.g. that we don't lose messages once we took them from you or that we assign gapless sequence numbers, and that has throughput impact on the individual entities like a single Topic. That's exactly like a highway lane just being able to deal with X cars/hour. Make more lanes.

like image 61
Clemens Vasters Avatar answered Oct 18 '22 00:10

Clemens Vasters


Since these replies, Microsoft has released a ton of new capability.

  1. Azure Auto-Scale can monitor the messages in a queue (or CPU load) and start or stop instances to maintain that target.
  2. Service Bus introduced Partitioned Queue's (& topics). This lets you send messages over multiple queues but they look like a single queue to you API. Dramatically increasing the throughput of a Queue.

Before you do that I'd recommend you try:-

  • Async & Batched writes to the queue.
  • Change the Prefetch parameter on the Reads.
  • Also look at Receive.OnMessage() to ensure you get the messages the millisec they are available.

This will improves your perf from ~5 messages / sec to many 100's or 1,000's per sec.

like image 8
David Lean Avatar answered Oct 18 '22 01:10

David Lean