azure - Windows Azure : Can I change the instances count of worker role while the application is running on the cloud

标签 azure azure-worker-roles

我可以在应用程序运行时更改辅助角色的实例计数吗?

我创建了一个应用程序,它根据用户的查询多次并行执行代码序列。比如说,如果用户要求结果非常准确,那么我将不得不在不同的数据集上并行运行代码 1000 次或更多次。如果用户不要求结果准确,那么我将并行运行代码 5 次。 该代码序列由辅助角色执行。我将启动我的应用程序,辅助角色的实例计数为 5。如果用户请求结果非常准确,那么我可以将辅助角色的实例计数增加到 20。请求完成后,我会将实例计数设置回 5。

我可以这样做吗?我怎样才能做到这一点。如果我这样做,应用程序会重新启动吗?

最佳答案

是的,你可以做到这一点。 Windows Azure 公开管理 API 来执行配置和取消配置其他辅助角色等任务。

您可以查看Lokad.Cloud项目的自动缩放接口(interface):http://code.google.com/p/lokad-cloud/wiki/AutoScaling

Within a QueueService or a ScheduledService, you can access the property CloudService.Providers.Provisioning which will grant you a programmatic access to cloud fabric in order to adjust the number of workers running for your application.

关于azure - Windows Azure : Can I change the instances count of worker role while the application is running on the cloud,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3173109/

相关文章:

azure - 有没有办法在 ADF 中动态源数据集?

azure - 使用来自 Progress Openedge 的 login.microsoft.com 进行 SAML 身份验证

java - 将 Java Spring Boot 应用程序部署到 Azure Web App Linux

Azure辅助角色调用第3方命令行组件

.net - Web 应用和函数应用的 Azure 全局应用程序设置

Azure vs WCF vs ASP.NET vs ...它们如何组合在一起?

.net - azure辅助角色中的DbConfiguration.SetConfiguration

适用于辅助角色的 Azure 应用程序见解

azure - Azure 上的 Quartz.net 未找到时区 ID 'Coordinated Universal Time'

azure - Azure Pack 是否支持使用 WASABi 自动缩放 Web 和辅助角色?