Search code examples
azureazure-web-app-serviceazure-service-fabric

What are the advantages of using a Service Fabric stateless service over a Cloud Service Worker Role?


I am trying to understand the advantages of using Service Fabric over a cloud service worker role.

Currently, I am using a cloud service for hosting (web role and worker role).

Will there be any advantage if I change the cloud service to an App Service Web app for hosting the web role and a Service Fabric stateless service for hosting the worker role? If so, what are the advantages?


Solution

  • As @PRADEEP CHEEKATLA said,Service Fabric itself is an application platform layer that runs on Windows or Linux, whereas Cloud Services is a system for deploying Azure-managed VMs with workloads attached.

    In Cloud Services, a Worker Role VM hosts one workload. In Service Fabric, applications are separate from the VMs that run them, meaning you can deploy a large number of applications to a small number of VMs, which can lower overall cost for larger deployments.

    And the key difference between Service Fabric and Cloud Services is that in Cloud Services you connect to a VM, whereas in Service Fabric you connect to a service.

    This is an important distinction for a couple reasons:

    1.Services in Service Fabric are not bound to the VMs that host them; services may move around in the cluster, and in fact, are expected to move around for various reasons: Resource balancing, failover, application and infrastructure upgrades, and placement or load constraints. This means a service instance's address can change at any time.

    2.A VM in Service Fabric can host multiple services, each with unique endpoints.

    Here is a comparing Cloud Services with Service Fabricenter image description here

    Also, you could refer to this article to converting Web and Worker Roles to Service Fabric stateless services.