问题
I am quite new to Azure and not quite sure what service I need to achieve this:
What I want to do is developing an application/service to do some computing tasks. I have created a web API for sending data to my database. I will use the data from my database to perform some computing and store results back in the database. This app/service will be run continuously.
I am not sure if I should use a web job or a cloud service or a virtual machine. They all seem to be able to achieve what I want.. or maybe there are things I should consider?
Many thanks,
LT
回答1:
A general data processing job like this, should be achievable through both Web Jobs, Cloud Services and VMs. These solutions represents different levels of control in the Azure platform, and it depends on how much control over the process you need.
Web Sites only lets you run code inside IIS (the Web Server), so they are not suitable for running background processes without interruption. Therefore, Web Jobs have been created to help users run background processes for their Web Sites. You will not be able to control advanced things, like memory consumption or user permissions, but in your case this is probably not required. I would try this first.
If Web Jobs is not enough, a Cloud Service with a worker role should give you necessary control over the machine resources, and it can be run with elevated user permissions. The most technical way is to run a VM, but then you also need to control things like patching on your own. This is only useful if you need very specific control over how your programs are installed, and should not be necessary in your case.
来源:https://stackoverflow.com/questions/28830345/azure-vm-cloud-service-or-web-job