Search code examples
microservicesazure-service-fabricstatelessstateful

Wether to make a service stateless or stateful in Azure Service Fabric


I have microservice which basically read and update data on an Azure Storage table Read and Update function are implemented as REST calls.I am confused whether to make it stateless or stateful


Solution

  • If a service needs to keep its own state, make it Stateful. If your service uses an external store for state, it's probably fine to make a Stateless service.

    So unless you need run a workflow that calls several REST services and need to support retries, progress tracking, store intermediate results, etc. it's probably ok to go with a Stateless service.