Autoscaler Class

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information about Transient Fault Handling, see Transient Fault Handling.

The Autoscaler is the main entry point of the block. It is used to start and stop all the operations made by the block components (rules evaluation, data points collection, scaling operation, etc.). It's possible to instantiate a new version of the Autoscaler class by calling the main constructor or by resolving it from the Enterprise Library Container.

Namespace: Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling
Assembly: Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling (in Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.dll) Version: 5.0.1118.0 (5.0.1118.0)

public sealed class Autoscaler : IDisposable

When the Start method of the Autoscaler class is called, the block attempts to read and parse the rules from the rules store and the service model from the service information store. If any error occurs during the reading and validation of the rules or the service model, the block will log an exception and continue. When a new corrected version of the rules or of the service model is saved to the store, the block will automatically attempt to load your new set of rules or your updated service model. It is also important to call the Stop method in the Autoscaler class when the worker stops. This ensures that the block releases its lease on the blob before the role stops.