Layer7 API Management

 View Only
  • 1.  route via http: loadbalancing without failover

    Posted Jun 05, 2019 06:06 AM
    Is there any possibility to have multiple backend urls configured in the Connection Tab of the route via http(s) assertion but without failover?
    What I would like to have is a loadbalancing for normal requests (switch between backend urls in a round-robin way) and a fail-fast strategy (no failover) for failing requests.

    I already have the property "Maximum Retries" on 0. But this does not prevent the failover to the next url.
    For example, if I have two urls configured, failover strategy = round-robin, connection timeout = 30000ms, read timeout = 60000ms, max retries = 0, it does the following:
    1) Send request to URL1 and wait max 60 seconds
    2) After 60 seconds: send same request to URL2 and wait max 60 seconds




  • 2.  RE: route via http: loadbalancing without failover
    Best Answer

    Broadcom Employee
    Posted Jul 18, 2019 12:42 PM
    Hi Andreas,

    Sorry for the late reply.

    I believe you can set the "retries" option to 0 and that should mean it will only try one of the connections specified rather than all of them.

    Dustin.


  • 3.  RE: route via http: loadbalancing without failover

    Posted Jul 29, 2019 02:31 AM
    Hi Dustin,

    As I pointed out in my post, it does not only try one connection. You can test it yourself with the settings i mentioned and you will see that it always tries all connections.

    Regards,
    Andi


  • 4.  RE: route via http: loadbalancing without failover

    Broadcom Employee
    Posted Jul 29, 2019 12:40 PM
    Edited by Dustin Dauncey Jul 29, 2019 12:42 PM
    Sorry, I somehow missed that and I suppose my test in my lab was invalid because that wasn't the behaviour I saw when I tried the other week for you. But if this is true, then there isn't a way to do it with no failover when listing multiple connections. However if your ultimate goal is simply to "fail fast" then definitely don't be using 60 seconds as the timeout. I'd recommend a very low number such as connection timeout = 2 seconds, read timeout = 5 seconds (as an example). The recommendation is generally to make those timeouts match your expectations for performance or an SLA. So for example if you are promising response times in less than 5 seconds to your clients who are hitting the API Gateway, then make sure the read timeouts add up to be less than that. That would be the "fail fast" strategy and would meet your need there, but your request to list multiple URLs but have it not use failover isn't possible as that's not how that feature of the routing assertion was designed.

    EDIT: I also want to add that if you could try having the routing assertion point to a LB VIP or something which itself then does the failover handling and you have more customization from that level which could also meet your goals as the Gateway would only have one endpoint specified and your failover strategy could then be set on the LB VIP which fronts your backends. Another alternative solution for you there.

    ------------------------------
    Senior Technical Support Engineer
    Broadcom
    ------------------------------