Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scale Service Fabric based on service bus queue size

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

like image 690
Paul Avatar asked Jun 02 '18 06:06

Paul


People also ask

How many queues can a Service Bus have?

Currently Service bus allows up to 100 partitioned queues or topics per namespace. Each partitioned queue or topic counts towards the quota of 10,000 entities per namespace (doesn't apply to Premium tier).

What is used by Azure Service Fabric cluster to provide scalability?

Scaling in Service Fabric is accomplished several different ways: Scaling by creating or removing stateless service instances. Scaling by creating or removing new named services. Scaling by creating or removing new named application instances.

What is a Service Bus queue?

Service Bus queues are a general-purpose technology that can be used for a wide variety of scenarios: Communication between web and worker roles in a multi-tier Azure application. Communication between on-premises apps and Azure-hosted apps in a hybrid solution.


1 Answers

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://docs.microsoft.com/en-us/azure/monitoring-and-diagnostics/monitoring-autoscale-scale-by-custom-metric

like image 55
gilmishal Avatar answered Oct 27 '22 01:10

gilmishal