Programmatically spawn new work role instances

Is it possible to programmatically generate new instances of a work role? I have a working role, depending on some service bus queues (s), where it captures messages and puts data in a table store, SQL database and sends notifications. I need to be able to add more instances depending on the size of the SB queue, as they may gradually receive large volumes of messages in the future. Is it possible for me to control this from my code? And in that case, how?

+6
source share
1 answer

There are several ways to achieve this functionality:

1) Windows Azure supports automatic scaling based on the number of messages in Service Bus queues. You can simply configure scaling to work with the Azure Management Portal. It is currently free during beta testing, and the price has not yet been announced when it is alive.

2) There is an open API called WASABi from the Microsoft Patterns and Practices group. You will need a place to host it, but it will interact with the Azure Service Management API on your behalf and provide you with the infrastructure to implement your own automatic scaling based on Service Bus queues. Using it, you will mainly process some XML configuration files.

3) If you are not opposed to using third-party products and services, there is an AzureWatch service (with which I am associated) that will give you a way to scale based on Service Bus queues, like the Azure Portal, but it will have many other options, functions and services .

4) You can use the service management API to change the number of instances, but I really do not recommend using it directly with the API, for example, with WASABi.

I recently wrote a blog about autoscaling http://blog.paraleap.com/post/2013/07/29/Windows-Azure-Auto-scaling-Options-Side-by-Side-Comparison

+9
source

Source: https://habr.com/ru/post/952504/


All Articles