0

Ok Azure Experts,

  • I have a task that only needs to run once every week - this is a long running task that can take 2-3 days to run.

  • I have set up a worker role to scale based on a queue. On the day that we want the task to start - we populate the queue (using a Web Job).

  • During the rest of the time, when the queue is empty, I want the worker roles to shut down - but I cannot scale down to 0 instances.

  • Originally, we wanted to do this with a Web Job, but the website shuts down from time to time - abruptly turning off my webjob - is this supposed to happen? Even with Keep-Alive turned on? Also, you cannot stop a triggered Web Job from running - so if we want the process to stop - we need to turn off the Web site - not ideal.

How do I scale my instances down to zero?

* Alternatives solutions are also welcome.

Trying to minimize cost here - why pay for a worker role that isn't doing anything?

4

1 回答 1

0

目前无法将 Worker Role 缩减为 0 个实例。即使您 STOP 工作角色,您仍然会为 STOPPED 实例产生费用。

但是,您正在寻找的行为可以通过虚拟机实现。如果您关闭(STOP & DEALLOCATE)虚拟机,您无需为该机器支付费用。

现在,唯一的挑战是根据队列计数停止/启动 VM。我不记得 Azure 门户的本机扩展是否支持将 VM 缩减到 0 个实例。但是,如果您使用AzureWatch,您应该能够毫无问题地完成此操作。免责声明:我隶属于 AzureWatch。

高温高压

于 2014-10-28T17:51:49.617 回答