A stateful Microservice stores state information stored in a consistent and highly available manner using reliable data structure. By default, the state data is saved on the disk of the compute node. However, you can write your own state providers to store state data externally and consume it. Service Fabric ensures that your state data is consistent and highly available so that, in case of failure of primary compute node, a secondary node can resume processing without loss of data.
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...