Support for partitioning

Service Fabric supports partitioning of Microservices. Partitioning is the concept of dividing data and compute into smaller units to improve the scalability and performance of a service.

A stateless Microservice can be of two types – one which stores the state externally and two which does not store a state. These Microservices are rarely partitioned as the scalability and the performance of the service can be enhanced by increasing the number of instances running the service. The only reason to partition a stateless service would be to achieve specialized routing requirements.

Service Fabric natively supports partitioning of state for a stateful service, thereby reducing the overheads on the developers around maintaining and replicating state across partition replicas. A partition of a stateful service can be thought of as a scale unit that is highly reliable through replicas distributed and load balanced across the nodes in a Service Fabric cluster. Service Fabric controls the optimal distribution of the partitions across multiple nodes, allowing them to grow dynamically. The partitions are rebalanced regularly to ensure resource availability to each service deployed on the cluster.

For instance, if an application with ten partitions each with three replicas is deployed on a five node cluster, Service Fabric will distribute the instances across the nodes with two primary replicas on each node:

Partitioning on a five node cluster

Later, if you scale up the cluster to ten nodes, Service Fabric will rebalance the primary replicas across all the 10 nodes:

Partitioning on 10 node cluster

The same logic will apply when the cluster is scaled down.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset