Stateful Services

One important pattern we need to implement for high-performing services is the colocation pattern. Colocation means that the data needs to be as close as possible to the service to avoid latency when accessing the data. In addition, the data is usually partitioned to avoid too much traffic on a single data store, which then becomes a bottleneck.

This is exactly where we can use stateful services in Service Fabric. Think of stateful services as those where the data is partitioned and colocated directly within the service itself. Service Fabric ensures reliability of data through replication and local persistence.

There are three important concepts when it comes to stateful services replication.

Partition: A partition is a logical ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.