8

I have a set of stateless services

These services are connected to service bus

Each service looks at 3 specific service bus queues

What I would like to do is to add the number of messages on across these queues

If the total is above a specific number say 10000 I want to add 2 more instances otherwise I can reduce the instances

Is this possible?

The auto scale functionality of service fabric seems to be more based on resources

Paul

Paul
  • 2,773
  • 7
  • 41
  • 96
  • Wouldn't it make more sense to allow an already established library to make that decision based off of resources instead of trying to manage it yourself? – Adam Jun 07 '18 at 19:46
  • What already established library? – Paul Jun 07 '18 at 19:55
  • As you said, "The auto scale functionality of service fabric seems to be more based on resources." – Adam Jun 07 '18 at 20:00
  • Yep so if I have a situation where I have a queue which has several thousand messages auto scale can’t help as far as I can tell? – Paul Jun 07 '18 at 20:24
  • I'm not sure, but if your message queuing is causing a performance issue then Service Fabric's autoscale functionality should 100% let you distribute the load if necessary. If queuing is not causing a performance issue then there should be no issue at all. So there may be a Service Fabric configuration fix to handle the load if there is indeed excess load. – Adam Jun 07 '18 at 20:54
  • As far as my application is concerned the message queue being large is not an issue it just plods its way through it, I want it to be faster and to scale based on the number of messages – Paul Jun 08 '18 at 07:18

1 Answers1

2

Using the Monitor option in Azure you can set autoscale for any resource. Once you Enable autoscale for your Service Fabric Nodes (not the service fabric itself) you will be able to control the specific metrics you want to base your scale

Example

I shared a printscreen from autoscalling on my Service Fabric - in mine it shows EventHub, because I don't use a service bus, but it can be applied to service bus according to the options in the metric source

for more reference look here: https://learn.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-autoscale-scale-by-custom-metric

gilmishal
  • 1,884
  • 1
  • 22
  • 37