Load balancing between two Logic Apps exposed as service RRS feed

  • Question

  • Hi,

    I have two Logic Apps exposed as web services - each having a unique URI. Now based on certain logic, i want the requests to be routed either to url1 or to url2.

    Any ideas as to how the same can be implemented?



    Tuesday, March 14, 2017 9:57 AM

All replies

  • There are two ways you can approach.

    1. Azure Load Balancer

    2. Azure Traffic Manager

    Both of which will be able to help you to route your traffic and load balance your site.

    For traffic manager, it operates at DNS level.

    Where you point your domain CNAME to Traffic Manager URI. It will resolve your domain name to Traffic Manager and based on the routing method, send the user accordingly. Traffic manager controls the distribution of user traffic to your endpoints.

    Load Balancer on the other hand load balance with 2 ways, internal load balancer and internet load balancer, whether it will balance internally or externally.

    It is a Layer 4 (TCP, UDP) load balancer that distributes incoming traffic among healthy instances of services defined in a load-balanced set.

    Hope this helps.


    Thursday, June 29, 2017 3:18 AM
  • Hi Saraubh,

    Are you looking for a content based or a load balancing solution.

    Content Based

    If you are looking for content based solution, create a "manager" logic app, and based on the information you receive, you route to Logic App A or B (you could use either a decision or a case shape, depending on the evaluation you need).

    Load Balancing

    If you are looking at Load Balancing, I've tried that before with Traffic Manager. What I found is that traffic manager needs one of the following azure resources:

    It will also need a base address to land, which Logic Apps don't give you (something like

    So I've managed to implement it before using the following:

    1) 2 x Azure Functions (running in App Services Plan, as the last time I've tried - a couple of months ago) the Azure Traffic Manager didn't support Consumption Plan), which could be used to load balance. Each Azure Function was using the Azure Proxies functionaly to redirect to a specific Logic Apps

    2) Traffic Manager associated with each Azure Functions

    3) 4 x Logic Apps (2 Logic apps that simply returned 200 ok, used to probe the region (basically find out if the region is up, or the resource group is up in a way), and 2 logic apps with the functionality required).

    Something like this:

    So, although this works it can become REALLY expensive, because Traffic Manager will ping what I'm calling the "Pilot Lamp Logic App" which is the one it probes, almost every 30 seconds by default - so this is 2 action x 120 times per hours every 24 hours for each side of the load balance - that is 11 520 actions a day, or 345 600 a month. On top of that would have either the price of proxy functions, or alternatively 2 instances of APIM (which could replace Proxies, as that functionality is still in preview

    So this is not a requirement to be taken lightly. The only place I would see this being used is for mission critical integrations where the availability needs to be really, really high. Because from a scalability point of view, Logic Apps scales on demand with no problems.

    I hope this helps, Wagner.

    Thursday, June 29, 2017 10:30 PM
  • Another option would be to use APIM, such that all requests are sent to APIM. At APIM you can apply policies (routing rules) and call url1 or url2.
    Friday, July 28, 2017 1:03 AM
  •  Now based on certain logic, i want the requests to be routed either to url1 or to url2.

    So, this isn't (usually) "load balancing".

    Can you describe your exact scenario, maybe with some examples?

    Then we can give you the best advice.

    Sunday, July 30, 2017 8:02 PM