辅助角色VS Web作业 [英] Worker Role vs Web Job

查看:176
本文介绍了辅助角色VS Web作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解在云中运行的两个小重复性任务。

From what I understand both run small repeatable tasks in the cloud.

情况可能我想选择一个比其他什么原因在什么?

What reasons and in what situations might I want to choose one over the other?

推荐答案

一些基本信息:

WebJobs 有利于不需要它们运行的​​环境中的任何定制,不消耗很多资源,轻巧的工作项目。他们也对于只需要定期运行,调度或触发任务真的很不错。他们是价格便宜,易于安装/运行。他们在你的网站,这意味着你会得到你的网站运行在同一个环境中的上下文中运行,而他们使用的资源是你的网站不能使用的资源。

WebJobs are good for lightweight work items that don't need any customization of the environment they run in and don't consume very much resources. They are also really good for tasks that only need to be run periodically, scheduled, or triggered. They are cheap and easy to setup/run. They run in the context of your Website which means you get the same environment that your Website runs in, and any resources they use are resources that your Website can't use.

工作者角色有利于更多的资源密集型的工作负载,或者如果您需要修改的环境,他们正在运行(即安装到操作系统特定的.NET framework版本,或东西)。工人角色更加昂贵,并且稍微更难以安装和运行,但他们提供显著更多的权力。

Worker Roles are good for more resource intensive workloads or if you need to modify the environment where they are running (ie. a particular .NET framework version or something installed into the OS). Worker Roles are more expensive and slightly more difficult to setup and run, but they offer significantly more power.

在一般我会先WebJobs,然后移动到工作者角色,如果你发现你的工作量需要超过WebJobs可以提供。

In general I would start with WebJobs and then move to Worker Roles if you find that your workload requires more than WebJobs can offer.

这篇关于辅助角色VS Web作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆