Cloud service · Azure · Updated

Azure Service Fabric - Azure Service Fabric is a distributed systems platform for deploying, operating, and scaling stateful and stateless microservices, containers, and executable applications across clusters of machines.

In short

Service Fabric provides application lifecycle management, service placement, health monitoring, replication, and failover for distributed applications. On Azure, clusters run on virtual machine infrastructure, with managed clusters simplifying infrastructure administration; supported standalone Windows Server deployments also support environments outside Azure.

Cloud Services Hub →

9 key features of Azure Service Fabric

01
Stateful services with replicated data

Reliable Services supports transactional Reliable Collections whose state is replicated across a partition's replica set. Use this model when computation benefits from keeping durable working state close to the service, and configure backups separately.

02
Multiple hosting and programming models

Run Reliable Services, Reliable Actors, guest executables, and supported Windows or Linux containers. Processes and containers can coexist within an application, subject to node operating system and runtime compatibility.

03
Automatic placement and failure recovery

The runtime places instances and replicas according to resource requirements, placement constraints, and fault-domain policies. It restarts failed services and promotes eligible secondary replicas when a stateful primary fails.

04
Health-monitored rolling upgrades

Update application code and configuration incrementally across upgrade domains. Health policies can pause or roll back an unsuccessful deployment, but applications must still maintain compatible protocols and persisted data formats.

05
Partitioning and resource balancing

Partition stateful workloads to distribute data and processing across nodes, and report load metrics to support placement decisions. Plan partition boundaries carefully because infrastructure scale-out alone does not remove a hot partition.

06
Service discovery

The Naming service resolves logical service names to current endpoints as services move between nodes. Clients should use supported resolution patterns and retry transient failures rather than cache node addresses indefinitely.

07
Cluster and application health model

Health information is aggregated across applications, services, partitions, replicas, and nodes. Add application-specific health reports so that upgrade decisions and operational alerts reflect functional problems as well as infrastructure failures.

08
Stateful backup and restore

Supported Reliable Stateful Services and Reliable Actors can use periodic and on-demand backups. Capture backups before risky changes and test restoration against explicit recovery point and recovery time objectives.

09
Fault injection and resilience testing

Service Fabric testability tools can introduce failures and exercise service transitions in a controlled environment. Use them to validate retry behavior, replica recovery, and availability during node or process failures.

Where Azure Service Fabric is used

  1. 01
    Stateful microservice back ends

    Host services that maintain frequently accessed working data alongside business logic, such as inventory reservations or account workflows. Use partition-local transactions where appropriate and explicitly coordinate operations that cross partitions or external systems.

  2. 02
    Device telemetry processing

    Process device events with partitioned services or actors that maintain per-device state. Choose keys that distribute devices evenly and handle duplicate or out-of-order messages in application logic.

  3. 03
    Interactive sessions and gaming

    Represent game sessions, collaboration sessions, or user interactions as stateful services or actors. Keep active state close to computation while planning for reconnects and recovery after primary replica changes.

  4. 04
    Durable workflow and event processing

    Run long-lived workers that track workflow progress in replicated state and exchange messages through a broker. Use idempotent handlers and explicit settlement rules because local state updates and external message acknowledgments are not automatically one atomic transaction.

  5. 05
    Incremental modernization of existing applications

    Host compatible executable applications alongside newly developed services without immediately rewriting every component. Introduce service discovery, health reporting, and rolling deployment practices while validating configuration, storage, and node dependencies.

  6. 06
    Low-latency computation over working data

    Place computation near partitioned state for workloads such as recommendation evaluation or real-time rules processing. Benchmark replication overhead and partition skew against the latency requirements rather than assuming local state guarantees a particular response time.

How Azure Service Fabric is priced

Underlying Azure infrastructure consumption

Service Fabric has no separate platform charge; costs come from the Azure resources used by the cluster, including virtual machines, managed disks, networking, and public IP addresses. Provisioned nodes incur charges even when application traffic is low, and replica counts and spare capacity affect the infrastructure required.

Eligible compute savings options

Eligible virtual machine usage can benefit from Azure Reservations or an Azure savings plan for compute, subject to the selected offer's terms. These discounts apply to qualifying compute consumption rather than to a separate Service Fabric meter.

Dependent services and operational data

Budget separately for monitoring ingestion and retention, backup storage and operations, container registries, messaging, gateways, and applicable data transfer. High-volume diagnostics and cross-region backup or replication architectures can add material costs beyond the cluster's virtual machines.

Services Azure Service Fabric works with

A common Azure architecture separates HTTP ingress, application execution, messaging, and operational storage. Application Gateway routes requests to a deliberately configured ingress tier, while Service Fabric resolves and operates services within the cluster. Node types backed by virtual machine scale set infrastructure provide distinct capacity pools for front ends, workers, and stateful services. Infrastructure scaling must preserve replica placement and upgrade capacity, and service instance counts must be managed separately where necessary.

Asynchronous workloads commonly use Service Bus to decouple producers from Service Fabric workers. Workers can keep processing progress in Reliable Collections, but they must handle duplicate delivery and the transaction boundary between local state and message settlement. Blob Storage provides a destination for supported stateful backups; retention and restore testing remain necessary even when multiple replicas are healthy.

Key Vault centralizes certificates and secrets, with access and rotation designed for the chosen cluster model and application identity. Azure Monitor collects application telemetry and cluster diagnostics to support investigation and alerting. Keep management endpoints separate from public application ingress, limit network access to dependent services, and correlate deployment activity with latency, resource usage, and health changes.

Azure Monitor

Export application telemetry and supported cluster diagnostics to Azure Monitor using appropriate instrumentation and collection configuration. For example, correlate API latency and exceptions with node resource pressure and Service Fabric health events. Configure alerts for unhealthy services and failed upgrades; cluster health reporting alone is not a complete historical observability solution.

Azure Key Vault

Use Key Vault to store certificates and application secrets, with deployment and runtime access configured for the selected cluster and application model. For example, provision cluster certificates through supported mechanisms and let an application retrieve a database credential using an appropriately authorized managed identity where supported. Plan certificate renewal and secret rotation explicitly, including any application reload or restart requirements.

Azure Blob Storage

Use Blob Storage as a backup destination for supported Service Fabric stateful backup and restore configurations. For example, schedule periodic backups of order-processing partitions and take an on-demand backup before a state format migration. Apply retention and access controls, and test restore procedures because replica redundancy does not protect against every logical corruption or disaster scenario.

Service Bus

Service Fabric workers can consume queues or topic subscriptions through the Service Bus SDK. For example, a worker can receive an order command, persist processing progress in Reliable Collections, and complete the message after successful processing. Make handlers idempotent and handle lock renewal and redelivery because Service Bus settlement and Reliable Collections transactions are not automatically atomic.

Azure Application Gateway

Place Application Gateway in front of HTTP services to provide application ingress, TLS termination, and optional web application firewall protection. For example, route an API hostname to a stable cluster ingress tier or configured backend pool, with health probes aligned to the application's readiness endpoint. Application Gateway does not automatically resolve Service Fabric service names, so backend discovery and routing require an explicit design.

API Management

Service Fabric can use API Management as an ingress gateway. A Service Fabric backend in API Management resolves services through the cluster's Naming Service and can route requests to a specific service or partition.

Azure Container Registry

Service Fabric can pull private container images from Azure Container Registry when deploying an application. A Service Fabric managed cluster can authenticate the pull with a managed identity instead of storing registry credentials in the application manifest.

Azure Cosmos DB

Service Fabric is part of the Microsoft-managed infrastructure that runs Azure Cosmos DB. Cosmos DB customers do not provision or administer the underlying Service Fabric clusters.

Azure Data Factory

Service Fabric runs internal components of the Azure Data Factory service. Creating a data factory or running a pipeline does not require a customer-managed Service Fabric cluster.

Azure DDoS Protection

A Service Fabric managed cluster can use an Azure DDoS Protection plan to protect its public IP endpoints. This adds network-layer DDoS mitigation for traffic directed at the cluster.

Alternatives to Azure Service Fabric in other clouds

AWS

Amazon Elastic Container Service (Amazon ECS)Amazon Elastic Container Service (Amazon ECS)

Amazon ECS and Azure Service Fabric both deploy and scale containerized applications and manage workload placement across clusters. Amazon ECS can run containers on EC2 or on Fargate without managing servers, while Azure Service Fabric runs on VM clusters in Azure and can host executables alongside containers.

Compare fact by fact
Azure Service FabricAmazon Elastic Container Service (Amazon ECS)
Compute on the provider's cloudAzure VMs in managed or classic clustersEC2 or serverless Fargate
Application packagingContainers and guest executablesDocker containers
Red Hat OpenShift Service on AWS (ROSA)Red Hat OpenShift Service on AWS (ROSA)

Red Hat OpenShift Service on AWS (ROSA) and Azure Service Fabric both deploy and scale containerized applications across clusters. ROSA uses OpenShift Kubernetes and charges service fees in addition to AWS infrastructure costs, while Azure Service Fabric uses its own runtime and has no separate platform fee.

Compare fact by fact
Azure Service FabricRed Hat OpenShift Service on AWS (ROSA)
Orchestration runtimeService FabricOpenShift (Kubernetes)
Billed forAzure resources; no platform feeAWS infrastructure plus ROSA fees
What discounts apply toEligible Azure VM usageROSA worker-node service fees

What is Azure Service Fabric

2 min read

Azure Service Fabric orchestrates applications across a cluster of network-connected machines called nodes. Applications contain service types, executable code or container images, configuration, and deployment manifests. The runtime places service instances and replicas on suitable nodes, monitors their health, and moves or restarts workloads when failures occur or cluster capacity changes. Applications can combine stateless front ends, background workers, and stateful processing services within the same cluster.

Service Fabric offers several application models. Reliable Services integrates application code with service lifecycle, communication, and health APIs. Stateful Reliable Services can store transactional data in Reliable Collections, with Service Fabric replicating that state across replicas. Reliable Actors builds on Reliable Services to provide virtual actors with individually addressed state and turn-based execution. Existing applications can instead run as guest executables or containers, but hosting an arbitrary process does not automatically give its application data the replication and transaction semantics of Reliable Collections.

Stateful services divide their data and processing into partitions. Each partition maintains a replica set, and a primary replica handles writes while secondary replicas receive replicated state. Engineers must choose partition keys, replica counts, storage capacity, and placement policies that fit the workload. Avoid hot partitions, allow capacity for node failures and upgrades, and design clients to resolve changing service endpoints and retry transient failures. Replication protects availability but is not a substitute for backups or a regional disaster recovery strategy.

On Azure, choose between Service Fabric managed clusters and classic clusters. Managed clusters simplify management of the underlying infrastructure through the cluster resource, while classic clusters expose more infrastructure resources for direct administration. Define node types to separate workloads with different compute, memory, or isolation requirements. Coordinate infrastructure scaling with application scaling: adding machines creates capacity, but it does not necessarily increase a service's configured instance count or solve an unsuitable partitioning strategy.

Deploy versioned application packages and use health-monitored rolling upgrades to update services incrementally across upgrade domains. Configure meaningful health reports, evaluation periods, failure thresholds, and rollback behavior rather than relying only on process liveness. Stateful upgrades also require compatible data formats and carefully tested migration logic, because rolling back binaries does not automatically reverse persisted data changes. Test replica movement, primary failover, node loss, and restore procedures before production deployment.

Secure cluster management separately from application ingress. Configure authentication, certificates, network security rules, and least-privilege access to dependent services. Export application telemetry and cluster diagnostics to a monitoring platform, and alert on unhealthy partitions, resource pressure, failed upgrades, and certificate expiry. Maintain supported runtime and operating system versions: Service Fabric support for clusters running Windows Server 2019 or Windows Server 2022 ends on March 31, 2027, requiring an upgrade to Windows Server 2025. Azure Service Fabric Mesh was a separate offering whose preview retired in 2021; its retirement did not retire Service Fabric clusters.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.