Windows Azure and dynamic elasticity

安稳与你 提交于 2019-12-18 04:55:16

问题


Is there a way do do dynamic elasticity in Windows Azure? If my workers begin to get overloaded, or queues start to get too full, or too many workers have no work to do, is there a way to dynamically add or remove workers through code or is that just done manually (requires human intervention) right now? Does anyone know of any plans to add that if its not currently available?


回答1:


There's a Service Management API, and you can use that to scale your application (from code running in Windows Azure or from code running outside of Windows Azure).

http://msdn.microsoft.com/en-us/library/ee460799.aspx and http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuresamples&ReleaseId=3233.




回答2:


Microsoft shipped the Autoscaling Application Block (Wasabi) to provide dynamic scaling. Some of the supported scenarios:

  1. Autoscaling both web and worker roles in Windows Azure by dynamically changing instance counts or performing application throttling.
  2. Autoscaling Windows Azure roles based on timetables.
  3. Autoscaling Windows Azure roles based on metrics collected from the application and/or Windows Azure but constrained by upper and lower bounds on the instance count per role.
  4. Preventing fast oscillations in the number of role instances with the stabilizer. The stabilizer can also help to optimize costs by limiting scaling up operations to the beginning of the hour and scaling down operations to the end of the hour.
  5. Monitoring and logging autoscaling activity.
  6. Sending notifications to preview any scaling operations before they take place.
  7. Encrypting the rules and other configuration in Windows Azure blob storage or in local file storage.
  8. Managing the autoscaler configuration by using Windows PowerShell.

A comprehensie sample application (Tailspin Surveys) showcasing all these features is provided (installation instructions are available here). Also, check out the Developer's Guide and the Channel9 video walkthrough.

The block is available as standalone download of binaries, source or via NuGet.

Here are a couple of talks/demos showing Wasabi in action:

  • CloudCover Episode on autoscaling

  • p&p symposium talk "Windows Azure app scaling to need"




回答3:


Windows Azure has just added the autoscaling feature built into the platform. Now it's trivially easy to configure your autoscaling rules right in the management portal:

See the announcement and the demo. I've also written a post comparing Windows Azure Autoscale to Wasabi and outlining the path forward.




回答4:


  1. Create a queue named autoscale.[your_role_name].instance_count
  2. In the Management Portal, set the autoscale to Queue.
  3. Set the Target Count field to 1.

Now you can use standard enqueue and dequeue operations on that queue to control the number of worker role instances. You've got 7 days to process a message before it expires, so you might want to create a worker role that can ensure that the number of messages in the queue is tracking your target instance count.

If you're after dynamic elasticity, you've probably already got a worker-role-based controller in mind already, so that's probably not a problem.




回答5:


Lokad.Cloud open source project for Windows Azure contains distributed executor framework. Among other things it provides auto-scaling with VM provisioning feature.



来源:https://stackoverflow.com/questions/2870044/windows-azure-and-dynamic-elasticity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!