Search code examples
c#azureazure-service-fabric

Open multiple sockets on dynamic port range in Azure Service Fabric Application


We have an application that we put in Azure Service Fabric. This application need to open multiple sockets on multiple port.
This application need to use some static port too. Is it possible in Service Fabric to work with dynamics ports for socket or did we need to put all port in ServiceManifest.xml ?


Solution

  • If I understand your question correctly, it's true for both. Generally you need to specify all the endpoints in ServiceManifest that service should listen on, and then add a listener per each endpoint. As for dynamic ports, when you specify the endpoint you could leave the port empty so SF will pick some random one for you at run-time.