Reputation: 3069
I am trying to understand the maximum number of actor id instances that will be executing a given method (on given actor interface) at any time in a given service fabric cluster. Here is my example:
Here are my questions:
Since actor model guarantees single thread programming, will there be only one instance of CustomerActor (mapped to actor id: Customer/8) that executes ICustomerActor.Process method in the entire cluster?. If so, does this mean there may be 19 requests queued up at most (assuming the 1st request has not finished yet)?
Or will there be 3 instances (one per node) of CustomerActor (all mapped to actor id: Customer/8) that execute ICustomerActor.Process method simultaneously in the entire cluster? If so, does this mean there may be 19/3 requests queued up at most (assuming the 1st request on any node has not finished yet)?
Or will there be 9 instances (one per partition across all nodes) of CustomerActor (all mapped to actor id: Customer/8) that execute ICustomerActor.Process method simultaneously in the entire cluster? If so, does this mean there may be 19/9 requests queued up at most (assuming the 1st request on any partition has not finished yet)?
Or is there another behavior that I have not accounted for?
Upvotes: 3
Views: 1218
Reputation: 11470
Actor
, using one ID. Actor
access is indeed 'single threaded access', so requests are queued up. (this answer is how it works)ActorService
(stateful service), which has primary and secondary replicas. Actors themselves have no primary/secondary concept. ActorID
determines the partition of the ActorService
it's hosted in.more reading:
Upvotes: 3