Azure App Service vs Azure Service Fabric

StewartArmbrecht picture StewartArmbrecht · Jun 30, 2015 · Viewed 21.3k times · Source

Can anyone direct me to something that will explain when I should create an Azure Service Fabric application vs an Azure App Service application? I have an application I want to build but can not determine whether I should build it using the Azure Service Fabric or the Azure App Service.

Answer

charisk picture charisk · Jul 1, 2015

Unfortunately there isn't any official guidance about when to use what. They're two separate platforms, following different development paradigms.

The App Service will give you functionality that Service Fabric doesn't provide out of the box. Stuff like auto-scale, authentication, rate limiting, integration with SaaS applications, etc. Some or all these things may come to Service Fabric gradually, but I'd say that, at the minute, they're targeted at different audiences - a less experienced team might find it easier to work with the App Service.

Service Fabric on the other hand makes composition of parts easier. For example, in the "traditional" approach, if you had an API that speaks to a data store and a cache to avoid hammering the data store, you'd have to handle the various fault tolerance scenarios. With Service Fabric your cache can sit within the API process in a reliable collection and you won't have to deal with having an external cache component. The data is co-located with the service (faster to retrieve/edit!) and is reliable as it's distributed across all the nodes the service is deployed into. Similar thing with queues. If you think of a workflow type system, where there is an API, a job service, and a queue that sits between them and allows them to communicate, you'd have to manage 3 different components and the communication between them. With Service Fabric the queue comes into the application. And that's just half of it :) you also get the power of using the actor model for distributed computation without the usual concurrency headaches. Finally, with Service Fabric you get the benefit of having a more complete development environment on your local box - you don't have to deal with creating queues, etc. on an Azure dev account or anything like that.

Also worth noting that there's nothing stopping you from using both paradigms - imagine two apps with at least one of them being a service fabric app, that expose APIs and a logic app that sits on top of those.

Your decision should be based on what you're trying to build, in how much time, when you want to release (Service Fabric is currently only in private preview so it'll be a while until they get to GA) and what kind of team you have. I imagine that with the App Service it'll be easy to hit the ground running even if you don't have a massively experienced team, but Service Fabric will give you more power, flexibility and control.