Stateful service architecture

A stateful service takes requests from clients through the ICommunicationListener interface:

Stateful Reliable Service architecture

The implementation of a stateful reliable service derives from StatefulService class. Service Fabric runtime manages the lifetime of your stateful Microservice through the StatefulService class. The service can use Reliable Collections to persist state information, which are similar to collections in System.Collections namespace but with added features for high availability and consistency. The read and write operations of Reliable Collections go through Reliable State Manager. The state is replicated to secondary nodes by a Transactional Replicator. This replication ensures that state data is reliable, consistent, and highly available. After ensuring that state data has been copied to secondary replicas, the Transactional Replicator invokes the logger. The logger is responsible for persisting state data to disks by using append-only log files. In case of failure, state can be restored by replaying the logs.

There are two types of logs that store the state data. The shared logs are stored under node-level working directory. The logs in shared log are copied lazily to dedicated logs that are stored under service working directory.

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

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