The following diagram shows an Azure Load Balancer sending traffic to an Azure Application Gateway:

enter image description here

How do I actually configure the Azure Load Balancer to do this? When configuring the Backend Pool I can only choose VMs in an Availability Set - I can't choose an Application Gateway.


The picture above was intended to illustrate there's a hierarchy of load balancing options in Azure. It's not how the load balancing options interact from a data path perspective. It's an attempt to indicate how they relate and where they play. You can mix and match them depending on what you need for your application.

A couple of quick points:

Azure Load Balancer is a multi-tenant, layer 4 load balancer platform that is part of the Azure SDN stack and frontends most services in Azure and provides per flow load balancing for UDP and TCP services.

Application Gateway is an HTTP/HTTPS load balancer and WAF, and uses Azure Load Balancer to frontend the components that make up Application Gateway. This is done implicitly for you as part of the Application Gateway product and not something you have to configure as a customer. We basically use Azure Load Balancer to set up some plumbing underneath Application Gateway. This is why frontending Azure Application Gateway with Azure Load Balancer is really a noop, it's already happening.

Traffic Manager is global DNS load balancing where a CNAME is returned to a client based on a TM profile. The TM profile you define governs how the CNAME returned to the client is determined. And the client then uses its resolver to determine the destination for the flow it will create directly to that destination. Traffic Manager is not in the data path of the application flow. You can frontend anything that has a public IP address endpoint, not internal endpoints inside a vnet (without an Instance-Level Public IP or ILPIP).

Best approach is to think of application architectures and consider what tiers may exist and what functions each of the tiers performs and how it might interact with the next. For example, you may place TM on top of endpoints exposed by Application Gateway to have HTTP load balancing and WAF (and implicitly use Load Balancer for load balancing to Application Gateway and provide high availability) and then use Load Balancer on the backend to deliver high availability for a SQL AlwaysOn cluster. Or you can use Load Balancer to roll your own HTTP proxy layer, many different options are possible. We provide a toolbox for customers.

  • 1
    Welcome to Server Fault. Good to see some more Azure folks. Mar 18 '17 at 20:58
  • In other words, the image is misleading and you can't configure it this way. I want a single public IP that will send HTTP/S to an app gateway which is constraining and routing traffic to two different backend VMs. I want certain other TCP ports forwarded directly to certain VMs. If I could set the app gateway as a backend pool in the load balancer this would be easy, since I can't, I'm starting to think I need two different PIPs.
    – Skrymsli
    Jun 22 at 17:31

I think the image is misleading, Azure Load Balancer endpoints are either "Azure VMs" or "Cloud Services role instances" https://azure.microsoft.com/en-us/documentation/articles/load-balancer-overview/

Instead of nesting to a load balancer, use Traffic Manager, you can nest Azure Traffic Manager Profiles. https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-endpoint-types/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.