Azure Web Job vs Worker Role
As part of my learning, I keep looking out for info presented through tables & comparison charts as they summarize lengthy topics & are useful to review what I learn. I post them with the tag ComparisonChart to revisit occasionally.
A comparison of the two ways Microsoft Azure provides to host background tasks:
The following scenarios are where Web Jobs can be a perfect fit:
Following are the scenarios where a Worker Role may be a better fit than a Web Job:
A comparison of the two ways Microsoft Azure provides to host background tasks:
Worker Role | Web Job | |
Hosting | Self-Hosted – Hosted on a dedicated virtual machine. | Web App hosted – hosted within a Web App container. |
Coupling | Decoupled from front-ends and middle tiers. | Coupled with Web App which is possibly hosting a web front end or middle tier. |
Scalability | Independently scalable. | Scalable along with the Web App hosting it. |
Remote Access | Supports remoting into the host VM. | Does not support remoting. |
Deployment | Complicated deployment. | Simple deployment. |
Configurability | High. | Low. |
Triggers | All triggers have to be programmatically introduced. | Supports on-demand, scheduled and continuous triggers. |
Management | Logging and diagnostics need to be coded in | Natively support detailed logging and diagnostics |
Debugging | Difficult to attach Visual Studio debugger. | Easily attachable to Visual Studio debugger. |
Pricing | Comparatively more expensive. | Comparatively cheaper. |
Excepting handling | Unexpected shutdowns have to be programmatically handled. | Supports graceful shutdown. |
Tenancy | Natively single-tenant. | Supports shared (multi-tenant) deployment. |
The following scenarios are where Web Jobs can be a perfect fit:
- Polling RSS feeds
- Sending SMS notifications
- Asynchronous logging
- Archiving
Following are the scenarios where a Worker Role may be a better fit than a Web Job:
- Locked down environment which requires strong security boundaries to be set up before executing the task. Banks and other financial institutions usually have such requirements.
- Legacy workloads using COM components which require registration during start up.
- Completely decoupled task layer where the background tasks need to be scaled independently.
Comments
Post a Comment