Using Notifications and Manual Scaling
Using notifications enables you to preview any scaling operations before they take place. The Autoscaling Application Block can send an email message to a designated operator (or operators) that details the suggested scaling operations. It is then the responsibility of the operator to perform the scaling operation manually.
To configure notifications, you must add configuration data to the configuration file of the blocks host process and change the service information configuration.
You must configure details of your SMTP service in the configuration file of the block's host process, as shown in the following snippet.
<configuration> ... <system.net> <mailSettings> <smtp from="email@example.com" deliveryMethod="Network"> <network host="localhost" port="6010"/> </smtp> </mailSettings> </system.net> ... </configuration>
To enable notifications for a hosted service, you must change your service information, as shown in the following snippet. Setting the scalingMode attribute to Notify enables notifications for the hosted service. Use the notificationRecipients attribute to specify the email address of the operator to receive the scaling notifications.
<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel"> <subscriptions> <subscription ...> <services> <service dnsPrefix="myautoscalingservice" slot="Staging" scalingMode="Notify" notificationRecipients="firstname.lastname@example.org" > <roles> <role ... </roles> </service> </services> <storageAccounts> ... </storageAccounts> </subscription> </subscriptions> </serviceModel>
The following table shows the contents of a sample notification message.
"Scaling requested for hosted service 'myservice' (Production) in subscription 'mysubscription'"
"The following scaling actions are required for hosted service 'myservice' (Production) in subscription 'mysubscription':
Role: role1 - Min: 1 - Max: 3 - Scale (abs): 3 - Scale (rel): 0 - Current: 2 - New: 3
Role: role2 - Min: 3 - Max: 5 - Scale (abs): 0 - Scale (rel): -0.75 - Current: 2 - New: 3
Evaluation id: 00dd4e00-cbf8-4799-b532-04bc13bbd3b7."
For more information about the service information XML configuration file, see the topic "Storing Your Service Information Data."
|You can also use a scaling mode of ScaleAndNotify in your service information if you want the block to perform the scaling operation automatically and notify the operator.|
Last built: June 7, 2012