0
votes

I have a single Service Fabric cluster in Azure that is currently hosting an API on port 443. My cluster is using the standard 5-node minimum setup. All nodes are Windows VMs. If I want to host a second API that listens on the same port, what possible solutions do I have?

For example:

serviceA.myDomain.com:443 -> deploys to all nodes, listens on port 443
serviceB.myDomain.com:443 -> can't deploy to all nodes since port 443 is already in use.

These are all Stateless services using the .NET framework (not .NET core) and I'm currently using Owin as my communication listener, so it looks like HttpSys might not be an option for port sharing because most references I've looked at are using .NET core when leveraging it.

It looks like Service Fabric has the concept of node placement restraints, documented here: Node Placement Restraints

One thought I have is adding additional nodes, placing restraints on certain services to deploy to specific node types and then using something like Azure API Management to direct traffic to the correct API. Would this be a viable option? If not, what are some suggested approaches I might take?

2

2 Answers

0
votes

Take a look at DNS Service in Azure Service Fabric

This seems to be what you are looking to achieve and using the DNS service should get you where you need to be

enter image description here

0
votes

Binding multiple Sites\APIs using SSL to the same IP has been very challenging task, there is a nice blog post here with some details on the topic based on IIS. DotNet framework will use the same concepts.

The main problem is that the browser need to negotiate the certificate before it start sending the requests to the server, the introduction of SNI made it possible, but it is still a bit hard do manage using .Net Framework (Not Core with Kestrel).

The easiest way is using a port dynamically allocated and put Proxy\Gateway in front of your services configured to forward based on the Host.

The recommendation I give to you is take a look in Traefik and see if help with your problem.