0
votes

I have to deploy a restful web api 2 project to Azure expecting a lot of traffic. I am not sure what Azure service to select in regards to the best performance. Web api services are running in background the complete IIS for http handling whereas a worker role needs implementation of http handling via OWIN. Any experiences?

2
I believe Web API services are most apt for such scenarios, besides you can scale/auto-scale them quite easily, think of worker roles as windows services in cloud. - Brij Raj Singh - MSFT

2 Answers

0
votes

I would recommend that you use Azure API Apps (https://azure.microsoft.com/en-us/documentation/articles/app-service-api-apps-why-best-platform/) as that is a service intended to host Web API 2 services. You get load-balancing, auto-scaling, monitoring, etc. when you use API Apps. So you can focus on building something that fullfil business requirements.

You should always avoid having to do any plumbing on your own as that always can get back and bite you later. API Apps is the right choice in this case!

0
votes

I would highly recommend you use the Azure App Service (either Web App or API App) in lieu of Azure 'Cloud Services'. The benefits are bountiful, the drawbacks are scarce.

A few notable benefits the App Service brings are auto-scaling, web jobs (think light weight worker roles), simpler and faster deployment mechanism, and some seamless integration with Application Insights.

About the only thing Cloud Services does better is scale (both vertical and horizontal). But for most web/webAPI scenarios these advantages are very much diminished with the new pricing tiers available for the App Service.

The App Service Environment (a new feature of the App Service) where you can literally scale up to an unlimited number of instances (default is 50, but you can call Microsoft to increase the limit) and use beefier (yes, that is a technical term) instance sizes.

Before you go the route of App Service Environment, I would recommend you evaluate the geo-distribution of your user population. Each App Service Plan can scale up to 10 and 25 for Standard and Premium pricing tiers, respectively. You could plop an App Service Plan in a couple different data centers (US-West, US-East, US-Central, or overseas depending the scenario) front it with a Traffic Manager and now you have three app service plans each with a max of 10 or 25 depending on the pricing tier. That can add up to a lot of metal and have the dual benefit of improving end user experience and increasing your system's availability / disaster recover.

These days I would only recommend Cloud Services for really intense batch processing or where there are architectural limitations of your existing application that require the ability to have greater control over the underlying OS of the instance (Cloud Services support startup tasks that let you do all kinds of crazy things when a new instance is spawned that you just can't do with the App Service).