By default, when you create service fabric cluster manually using azure portal, you will have to pick a node type name which will be tied to VM size etc. However what is not shown on the GUI is the application port range that is associated with this node type. The default application port range appears to be from 20000 to 30000.
When you create a service fabric cluster application using visual studio, the default port numbers are always less than 20000. The default port number is more like 8868 or something like that.
When you deploy this service to the above cluster, everything works as expected. Lets ignore the LB port mapping for this discussion.
This begs following questions:
The application port range is used when you let Service Fabric do Service discovery and resolution. If you don't specify end point ports, Service Fabric automatically assigns endpoints in this app port range that you provide while creating the cluster. Each service in Service Fabric cluster works based on an endpoint. Say if you have multiple microservices but you need only few services to be exposed with a http(s) endpoint, then you let Service Fabric decide the port for the services that you don't want to expose with http(s) endpoint. This port range also becomes handy when you want to configure port ranges in firewall or NSGs to open up traffic.
More details can be found here - https://azure.microsoft.com/en-gb/documentation/articles/service-fabric-connect-and-communicate-with-services/
Service Fabric provides a discovery and resolution service called the Naming Service. The Naming Service maintains a table that maps named service instances to the endpoint addresses they listen on. Service Fabric has a registrar that maps service names to their endpoint address.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With