I have 2 applications (A1 and A2) hosted in azure service fabric, each application with its own stateless reliable micro-service (S1 and S2). The app A1 depends on S1 and app A2 depends on S2. In addition, S2 service depends on S1. Both S2 and S1 are owin hosted REST api services. When the request for A2 ends up in S2, I need to make a call from S2 to S1. I am trying to figure out the optimized way of doing this.
1) Should I use HttpClient in S2 to call S1? How do I get the resolution for S1 in side of S2? Is it just published uri for S1 and fabric will know how to optimize those calls? 2) Should I implement 2 listeners in S1 (one http endpoint for A1 clients and one service remoting endpoint with an interface to call from S2)? Again how does address resolution work?
In either case, short code samples would be of immense help.
Thanks. Raghu/..