Layer7 API Management

Expand all | Collapse all

Slowing down a policy inside a loop

Jump to Best Answer
  • 1.  Slowing down a policy inside a loop

    Posted 01-30-2017 05:19 AM

    We have a policy that loops through some requested data via the "Run Assertions for Each Item of ... as ..." construct, and for each iteration, the gateway kicks off a call to a downstream server.

     

    In certain scenarios we can therefore find ourselves kicking off a number of calls to this downstream system, and according to the team responsible for this other system, in certain situations our calls are too close together, causing problems on their side.

     

    They propose putting a 'sleep' into our policy, within the loop, to slow things down.

     

    Would a shaping "Apply Rate Limit" assertion within the loop help with this? Is there another way?

     

    For information: not all paths through the policy enter into this loop - we don't want to shape all calls to the policy, only those that loop



  • 2.  Re: Slowing down a policy inside a loop
    Best Answer

    Posted 01-30-2017 04:54 PM

    Hello richiethom ,

    There is a tactical assertion Delay is exactly for your purpose.

    Please open a support ticket to ask the tactical assertion.

     

    Regards,

    Mark