1
votes

I have a Service Fabric cluster with 2 nodes. Each node is exposed to the web with a stateless Asp.net Core 2.0 service. I'm using HttpSys.

Each node has a unique IP address and the following ports:

First service on Node 1:

 <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" />
 <Endpoint Protocol="http" Name="ServiceEndpointSecure" Type="Input" Port="443" />

Second service on Node 2

 <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="81" />
 <Endpoint Protocol="http" Name="ServiceEndpointSecure" Type="Input" Port="444" />

I would like both services to listen to port 80 and 443 but If I change the ServiceManifest I see the error that the port is in use.

How can I make this work being the services on two different nodes with two different IPs and two different DNS names associated to the IPs?

1

1 Answers

0
votes

Use a load balancer like Azure Load Balancer to forward the traffic to the 2 ip addresses to your individual services. They can run at any port inside the cluster.

Alternative: Azure API management. can also be used to create rules that direct traffic to specific services.