简体   繁体   中英

Restful WebService in Azure: Web Role or Worker Role?

I'm trying to create a webservice and deploy it to Azure Cloud Services

The scenario is really simple: send a request via http or https to the service and receive some data.

I can't tell from documentation if this should be done in a WebRole or WorkerRole. As far as i understand a worker role can be accessed via http as well as a WebRole which runs in IIS.

can you please tell me what should i pick and why?

Thanks

Dan

You actually have several options here, depending on what you want:

1) An Azure Website.

Here you can host very simply a website, nothing more. It is also cheaper than an IIS role, but you have limited access. You get a pre configured IIS where your website is published on. You can't change any setting in this IIS - you just have your Web.config.

2) A Web Role

You get a maintained Windows machine with a fully installed IIS on. Your application will be installed in this IIS. You can remote access this machine, you can install additionally software using start-up tasks or change the settings of the IIS itself. Microsoft takes care of system updates.

3) A Worker Role

A Worker Role is absolutely equally to a Web Role, except of a missing IIS. If you don't use IIS and use a custom tool to host your website, go for this.

4) A Virtual Machine

Well yeah, just what the name says. A virtual machine where you have to take care of the OS yourself. Install whatever you want, Windows or Linux, and set it up the way you want.


If you don't need any special features, go with a WebSite. If you need something that is not available on a WebSite, use a Web Role. It is also very very easy to switch from a WebSite to a WebRole later one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM