问题
What is the best way to invoke the same method on all active instances of a stateless service in SFC? I mean doing something similar to below, just on ALL active instances:
var service = ServiceProxy.Create<IMyService>("<my-service-uri>");
await service.MyServiceMethod();
回答1:
Unfortunately looks like there is no way to send remoting request to the particular service instance / replica.
According to the documentation of ServiceProxy.Create method there is a very limited control over target instance / replica selection (it is strict to the TargetReplicaSelector enumeration).
来源:https://stackoverflow.com/questions/51243097/invoke-same-method-on-all-active-instances-of-a-stateless-service