Layer7 API Management

 View Only
  • 1.  Route Via HTTP - True Round Robin Pattern?

    Posted Oct 29, 2020 01:08 PM
    Community,

    Wondering if anyone has a pattern for Round Robin that will account for 404 - Not Found (potentially others) responses?

    We have attempted to setup the Route Via HTTP assertion with a Round Robin failover with a No Fail as long as a response is returned.  This is allowing the 404 - Not Found with the first URL is not found / not active to continue returning that error to the calling client.  The ideal result would be for the assertion to attempt to call the second (or next) URL in the round robin sequence.

    I attempted to setup the same assertion with a Fail if response > 400 but in the logs it appears this is attempting the first URL which fails with a 404, then it attempts the second URL in the sequence which is valid.  Unfortunately, the assertion still fails and returns a nasty SOAP error back to the calling client.

    Is there a way to make the assert act as First URL fails with a 404, attempt the Second URL in the sequence, and then succeed when that Second URL returns <400 response?

    Thanks.


  • 2.  RE: Route Via HTTP - True Round Robin Pattern?

    Broadcom Employee
    Posted Oct 30, 2020 01:25 PM
    Hello rick,

    You can use the Dynamic Routing and Routing Strategy assertions to accomplish this.

    This is a sample of implementing Dynamic Routing. this allows you to define your routing  strategy and gives you the ability to add logic to examine the routing response codes to determine your criteria if the route was "successful"  otherwise it will route to the next available server defined. 
    https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/10-0/policy-assertions/assertion-palette/policy-logic-assertions/create-routing-strategy-assertion/working-with-dynamic-routing.html