I am developing a web site which I plan to host on Windows Azure. The site will need to run some daily/weekly scheduled jobs, synchronizing to various 3rd party data sources, sending user notifications, etc. It should also be able to run on-demand async tasks such as sending emails to users etc.
My initial thought was to host this using Azure Cloud Services, with one web role running MVC 4 and one worker role both taking care of scheduled tasks, and pulling async tasks (sending emails etc) out of queue storage. However, this is going to cost me, seeing how I need to pay double for compute hours.
The project might justify this cost in the future, but before business picks up I'd really prefer a cheaper alternative. Therefore I'm looking into Azure Web Sites.
I could cut the cost in half by using Azure Web Sites for the MVC site and having a worker role running the taks, but I'd love to hear about other alternatives, besides the obvious option to manually trigger them from my admin module.
Also, can I connect the site to my domain and use ssl for free using Azure Web Sites?
Azure WebJobs are deprecated, but still in use. They are being phased out in favor of Azure Functions. Azure Functions is a more up-to-date and feature rich service which offers a greater degree of flexibility and control.
Summary. Azure Functions offers more developer productivity than Azure App Service WebJobs does. It also offers more options for programming languages, development environments, Azure service integration, and pricing. For most scenarios, it's the best choice.
For which web app can you configure a WebJob? Publishing a . NET Core WebJob to App Service from Visual Studio uses the same tooling as publishing an ASP.NET Core app.
It looks like Azure finally has proper scheduling built in - see the Azure Scheduler documentation
Whilst it's in preview and you'll most likely have to use the REST API for now, I'm sure it won't be long before the functionality is available in the management portal. I've been waiting ages for this!
If you're comfortable writing code in node.js, do take a look at Windows Azure Mobile Services
. It has the capability to define and execute scheduled tasks. More about this can be found here: http://www.windowsazure.com/en-us/develop/mobile/tutorials/schedule-backend-tasks/.
Another alternative could be to use Aditi's Scheduler Service: http://www.aditicloud.com/.
Yet another alternative would be to write your own scheduler and hosting that solution in Azure Websites. I would recommend using Quartz.net scheduling library. It's free, open source and used by many folks.
I still think going Worker Role route for job processing is a viable solution. What you could do is host the front-end infrastructure in a Windows Azure Website and have it communicate to the worker role via Windows Azure queues. Assuming you host 2 instances of worker roles in Extra Small VM size, it's going to cost you about $30.00 per month ($0.02 x 2 x 750 hours). I wrote a blog post on building your own task scheduler and hosting it in a worker role not too long ago. You can read that post here: http://gauravmantri.com/2013/01/23/building-a-simple-task-scheduler-in-windows-azure/
Also, can I connect the site to my domain and use ssl for free using Azure Web Sites?
I don't think so. SSL is not free with Windows Azure Websites. Take a look at SSL pricing here: http://www.windowsazure.com/en-us/pricing/details/web-sites/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With