Muhammad zubair
Muhammad zubair

Reputation: 291

Alternate to run window service in Azure cloud

We currently have a window service which send some notification emails to users after doing some processing on database(SQL database). Runs once in day.

We want to move this on azure cloud. One alternate is to put it on Azure VM as is. but I am finding some other best possible solution for that.

I study about recurring and on demand Web jobs but I am not sure is this is best solution. Also is there any possibility to update configuration of service code in App.config without re-deploy the code of service on cloud. I means we can manage configuration from Azure portal.

Thanks in advance.

Upvotes: 2

Views: 1679

Answers (1)

Veatch
Veatch

Reputation: 933

Update 11/4/2016

Since this was written, there are 2 additional features available in Azure that are both excellent choices depending on what functionality you need:

Azure Functions (which was based on the WebJobs described below): Serverless code that can be trigger/invoked in various ways, and has scaling support.

Azure Service Fabric: Microservice platform, with support for actor model, stateful and stateless services.


You've got 3 basic options:

  • Windows service running on VM
  • WebJob
  • Cloud service

There's a lot of information out there on the tradeoffs between these choices, but here's a brief summary.

VM - Advantages: you can move your service basically as it is without having to change much or any of your code. They also have the easiest connectivity with other resources in Azure (blob storage, virtual networks, etc). The disadvantage is you're giving up all the of PaaS advantages and are still stuck managing your own VM infrastructure

WebJob - Advantages: Multiple invocation options (queues, blobs, manually, queue receive loops, continuous while-loop style, etc), scheduled (would cover your case). Easy to deploy (can go with website, as a console app, automatically through Kudu), has some built in logging in Azure portal - and yes, to answer your question, you can alter the configuration in the portal itself for connection strings and app settings.

Disadvantages - you'll need to update code, you don't have access to underlying resources (if you need that), and more of something to keep in mind than a disadvantage - it uses the same resources as the webapp it's deployed with.

Web Jobs are the newest of the options, but at the same time appear to have active development going on to increase the functionality and usefulness.

Cloud Service - like a managed VM, has some deployment options, access to underlying VM if needed. Would require some code changes from your existing service.

There's nothing you've mentioned in your use case that makes me think a Web Job shouldn't be first thing you try.

(Edit: Troy Hunt has a great and relatively recent blog post illustrating most of the points I've mentioned about Web Jobs above: http://www.troyhunt.com/2015/01/azure-webjobs-are-awesome-and-you.html)

Upvotes: 6

Related Questions