简体   繁体   中英

Azure - inter service node communication

I have a standalone application (Nancy standalone hosted app in C#) and it should be packed for service-fabric. The application is a front-end based app and there will be more than single instance. Each instance should discover the rest of them because it has to communicate directly with the rest of them (they are in the same cluster).

Is there a way to name those instances so they become accessible by name (using DNS approach - is that the best?), without relying on Service Fabric API ?

(I have found the way how the name the service, but I do not know how to access the individual service instance directly)

DNS

You can talk to a Stateless service after discovering its endpoint address by using the DNS & naming service. (The DNS service maps DNS names to service names.) You can't influence which instance you'll talk to.

Service endpoint discovery & monitoring

What you can do is iterate over the Services in the Application to discover them. For instance, by type. Make sure you also monitor changes , endpoints may move because of deployments, crashes, resource balancing.

Every instance can then expose a unique secondary endpoint (eg. http), so it can be targeted individually.

Alternative to service discovery

By having each Stateless service instance register itself in a (self developed) (Stateful) Registry service. You can then ask this service which instances are known.

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