azure service fabric - Targeting a stateless replica on the same node when communicating over the ServiceProxy client -


i have deployed 2 stateless , singlepartion microservices service fabric cluster, hosted on azure. want hook communication between these services this:enter image description here

my masterdata web api service should prefer communicate masterdata serviceproxy service replica/instance on same node when calling method via serviceproxy client. if there's no replica/instance available on same node, connect node. code looks this:

var serviceclient = serviceproxy.create<imasterdataserviceproxy>(new uri("fabric:/sfapp/masterdataserviceproxy")); var result = await serviceclient.getmasterdata(); 

but communication this:

enter image description here

the serviceproxy connects randomly chosen replica/instance (due targetreplicaselector.default). i'm missing communication options "targetreplicaselector.prefersamenode". there way handle manually?

here's explanation: how can reach specific replica of stateless service

if still want it, either

  • use http listeners on localhost or
  • use stateful service (using statemanager optional)

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -