I want to make my Azure web role scalable in a self-contained manner.
All scaling solutions I've seen so far include some third party - it can be a special service that monitors the Azure role and scales it or it may be an application for manual scaling. What I want is extra code inside my role that makes decisions on when to scale and initiates scaling.
I forsee the following problems. First, there should be only one role instance at each point of time deciding when to scale and how to scale so that two or more instances don't create a scaling mess. Second, if that specific instance dies for whatever reason another instance must be selected within some reasonable period of time. And finally, all stuff should not introduce too much overhead.
Are there any patterns for implementing such self-contained scaling?
We have a been running autoscaled apps with on Windows Azure with our own provisioning lib for a while now, even before the release of WASABi.
The pattern that has been working best for us so far includes the following aspects:
You can certainly place auto-scale code in your web role. To prevent multiple instances from executing the scale logic, one technique is to use a "mutex" in the form of a blob lease (you can only have one blob writer).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With