How I can run multiple asp.net core web api in different node on local service fabric cluster

PABITRA BHUNIA 0 Reputation points
2023-04-10T05:09:12.4433333+00:00

I have a stateless web application used as frontend, A statefull webapi(want to use as gateway) application and two stateless application. I want to run all the service in different node on my local service fabric cluster. How to configure it?

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
269 questions
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 26,316 Reputation points
    2023-04-11T09:18:52.8533333+00:00

    Hello PABITRA BHUNIA

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    You can use the Placement Constraint where you can specify the different node names.

    Under the Service Manifest you can add the Placement constraint tag.

    <ServiceTypes>
        <StatelessServiceType ServiceTypeName="VotingWebType" >
          <PlacementConstraints>(NodeName==_Node_0)</PlacementConstraints>
        </StatelessServiceType>
      </ServiceTypes>
    

    Please refer these documents:

    https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-resource-manager-configure-services#placement-constraints

    https://learn.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-resource-manager-cluster-description#node-properties-and-placement-constraints

    Hope this helps.

    If you need further help on this, tag me in a comment.

    If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.