Azure Worker角色在睡觉时是否被收取$ $$?(Does Azure Worker Roles get charged $$ when they are Sleeping?)

编程入门 行业动态 更新时间:2024-10-26 10:27:43
Azure Worker角色在睡觉时是否被收取$ $$?(Does Azure Worker Roles get charged $$ when they are Sleeping?)

我试图弄清楚如何(粗略地)计算一些我正在考虑创建的工作人员角色的预期成本。

TLDR;

如果你的工作人员Sleep(someTime) /睡觉,天青会向你收取$ $$吗?


细节

Azure定价页面陈述其定价,每小时和每个VM大小。

所以为了让我的问题变得简单,我们假装我想要3个工人,每个工人都会在一个小的(A1)实例上。

现在 - 踢球者是这个=>时间!

所以让我们假装,这正是每个工人所做的。

Worker 1 : Do-Some-Work-That-Takes-1-Second-Exactly. Sleep(59000); Worker 2: Do-Some-Work-That-Takes-5-Seconds-Exactly. Sleep(550000); Worker 3: Do-Some-Work-That-Takes-10-Seconds-Exactly. Sleep(50000);

所以,工人1工作1秒,然后睡59秒。 工人2:5秒+55秒的睡眠。 工人3:10秒+ 50秒的睡眠。

这个想法,工人每分钟都会“开始”工作。

**是的是的我知道实时工作将是可变的..但让我们保持简单**

那么,对于每个员工,他们是否会每分钟收费(工作+睡眠)还是他们工作的时间?

例如。 1秒+5秒+10秒=每分钟16秒。 =每小时工作16 * 60 = 960秒

并且如果一小时内有3600秒......那意味着它只是在4小时或实际生活时间之后才会被收取1个小时的工作费用?

I'm trying to figure out how to (roughly) calculate some expected costs for some worker roles I'm thinking about creating.

TLDR;

Does azure charge you $$ if your worker is Sleep(someTime) / Sleeping?


Details

The Azure Pricing Page states their pricing, per hour and per VM size.

So to keep my question simple lets pretend I want to have 3 workers and each worker will be on a Small (A1) instance.

Now - the kicker is this => time!

So lets also pretend, that this is exactly what each worker does.

Worker 1 : Do-Some-Work-That-Takes-1-Second-Exactly. Sleep(59000); Worker 2: Do-Some-Work-That-Takes-5-Seconds-Exactly. Sleep(550000); Worker 3: Do-Some-Work-That-Takes-10-Seconds-Exactly. Sleep(50000);

So, worker 1 works for 1 sec, then sleeps for a 59 seconds. Worker 2: 5 secs + 55 secs sleep. Worker 3: 10 secs + 50 secs sleep.

The idea, every minute the workers will 'kick off', doing their work.

** Yes yes i know the real time work will be variable .. but lets keep this simple **

So, for each worker, will they get charged for each minute (work + sleep) or just the time they are working?

Eg. 1 sec + 5 secs + 10 secs = 16 secs per minute. = 16 * 60 = 960 secs per hour of work

and if there's 3600 seconds in an hour .. that means it's just under 4 hours or real life time before I get charged for 1 hour of 'work' ?

最满意答案

工作人员和Web角色每小时部署一次,因此即使无所作为也会因为您已经实际委托虚拟机进行分解而被收取费用。

即使角色已停止,但部署尚未被删除,您仍将支付该实例的费用。

另外请注意,它在整整一个小时内收费,所以如果您部署并在10分钟后取下,您仍需支付整整一个小时的费用。 或者,如果您在上午11:55部署并在12:15下午删除,您将支付2小时。

来自http://www.windowsazure.com/en-us/pricing/details/cloud-services/#

如果我的部署实例处于“已停止”状态,是否仍然收到帐单?

是的,已停止的实例仍然占用为实例提供动力的计算资源,因此您仍然需要付费。 为了停止计费,您需要删除您的部署。

如果我的网络或工作人员角色部署了不到一个小时,那么我需要支付多少费用?

云服务根据您部署服务的时钟数量计费。 如果在一个小时内部署时间超过五分钟,则任何部分时钟小时均按整小时计费。 如果您的服务部署时间少于一小时,则根据部署发生的时间,您可能会收到零个,一个或两个小时的费用。 例如,如果您在上午10点50分部署一个小型云服务实例,并在上午11点10分删除它,那么您将在上午10点50分到上午11点之间使用一小时,在上午11:00和上午11:10使用。

Worker and Web Roles are charged per hour of deployment so even if doing nothing it is being charged out as you have physically commission the vm to be spun up.

Even if the role is stopped but the deployment hasn't been deleted you will still pay for the instance.

Also note, it is charged for the full hour so if you deploy and take down 10 minutes later you still pay for entire hour. Or if you deploy at 11:55am and delete at 12:15pm you will pay for 2 hours.

From http://www.windowsazure.com/en-us/pricing/details/cloud-services/#

If my deployed instance is in the “stopped” state, do I still get billed?

Yes, a stopped instance still occupies the compute resource that powers the instance, and therefore you still get billed. In order to stop billing, you need to delete your deployment.

If my Web or Worker role was deployed for less than an hour, how much do I get billed for?

Cloud services are billed based on the number of clock hours your service was deployed. Any partial clock hour is billed as a full hour if the deployment was longer than five minutes within one clock hour. If your service was deployed for less than an hour, you may get billed for zero, one or two hours depending on when the deployment happened. For example, if you deploy a small Cloud Services instance at 10:50 AM and delete it at 11:10AM, you will be billed for two hours, one hour for usage during 10:50 AM to 11:00 AM and another hour for usage during 11:00 AM and 11:10 AM.

更多推荐

本文发布于:2023-07-22 18:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222288.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:睡觉时   角色   Worker   Azure   charged

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!