Search code examples
azureazure-web-rolesazure-application-gatewayazure-load-balancer

Azure WebRole Sticky Load Balance


I have an Azure WebRole, which publishes a WCF Service with PerSession setting. This means, session needs to be preserved for a long time... This is because of synch-framework and cannot be changed.

Now I have the problem when I want to use Multi-Instances on that Web Role (Classic Azure Cloud Service)

Can I configure an Application Gateway with endpoints not to the Public WebRole but to each Instances, so that the Gateway handles the Balancing? How?

Thanks


Solution

  • Technically, the Application Gateway support for multi-tenant backends, you could configure an IP address or FQDN of your instances in the backends. Here is a quickstart: Direct web traffic with Azure Application Gateway - Azure portal

    However, the Application Gateway is known as application layer (OSI layer 7) load balancing which enables you to manage traffic to your web applications. Perhaps the traditional layer 4 load balancer is better for balancing WCF Service. Moreover, In Cloud Services, you get a load balancer automatically configured when you create the service. You could get more explanation in this question.

    Ref: Get started creating an internal load balancer (classic) for cloud services