Search code examples
service-fabric-statefulazure-service-fabric

Multi tenant stateful service: service instance per tenant vs partition per tenant


We plan on using a stateful service to act basically as a cache for tenant data that is stored externally. Is there much difference in creating a separate service of the same service type for each tenant vs having one service and a separate partition for each tenant?


Solution

  • You cannot add and remove service partitions of a service on the fly. So using partitions is likely not the way to go if the number of tenants is a variable.

    You'll get the most flexibility and scalability if you use a service or even an application per tenant.