简体   繁体   中英

How To Scale Azure Service Fabric Actors Of The Same Service Type?

I'm new to Azure Service Fabric and the one part I'm trying to fully understand is how the scaling works. I currently have a Azure Service Fabric Application which consists of a stateless Reliable service web api and a stateful Actor Service.

While debugging this locally, I see that a single application is created with 5 nodes. The api is created on all 5 nodes as it had an instance count of -1 and the actor service is create with a primary on one node and 2 replicas on 2 other nodes.

The web api will create many actor instances (but its not really known how many in total there will be). Each one has its own unique state data and all these actors get created on the primary node the service was created on.

But how does this scale? Eventually, it would be possible for too many actor instances to be on that primary node so how can we scale this out? Will Azure do this for us? Do we need some sort of manager service? What would that manager service do - create a new actor service instance on a different node? create a new application instance? or something else?

To provide scalability and reliability, Service Fabric distributes actors throughout the cluster and automatically migrates them from failed nodes to healthy ones as required. Distribution, scalability, reliability, and automatic failover are all provided by virtue of the fact that actors are running inside a stateful Reliable Service called the Actor Service.

Actors are distributed across the partitions of the Actor Service, and those partitions are distributed across the nodes in a Service Fabric cluster. Each service partition contains a set of actors. Service Fabric manages distribution and failover of the service partitions.

For example, an actor service with nine partitions deployed to three nodes using the default actor partition placement would be distributed thusly: 在此处输入图片说明

Reference - Introduction to Service Fabric Reliable Actors

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM