Layer7 API Management

 View Only
  • 1.  Rate Limit Coversion

    Posted Oct 15, 2020 01:34 AM
    I want to change the unit of rate limit from max request per second to max request per minute for the Apply Rate Limit Assertion. Is there any possible way to change this unit?


  • 2.  RE: Rate Limit Coversion

    Posted Oct 15, 2020 05:56 AM
    Hi Sumeet,

    Rate Limit spread is only per second [Ref]
    You could use a Quota Throughput [Ref] if your aim to provide some form of restriction



    ------------------------------
    Pre-Sales Consultant
    CA Southern Africa
    ------------------------------



  • 3.  RE: Rate Limit Coversion

    Posted Oct 16, 2020 01:43 AM
    Hi Ronald,
    Thanks for your reply.
    Suppose I need to restrict no. of request per minute based on client id
    For e.g client id=x can have 2 req per minute and client id=y can have 3 req per minute.
    What Assertion should I use then?


  • 4.  RE: Rate Limit Coversion

    Posted Oct 16, 2020 12:29 PM
    Edited by nathan blumenthal Oct 16, 2020 12:29 PM
    You could use an "at least one" folder and add any "all" folders as a child to it, and inside each "all" folder, have a compare assertion to compare the clientid variable = some value, and if so, then add a throughput quota or rate limit below it in that same "all" folder.


  • 5.  RE: Rate Limit Coversion

    Posted Oct 23, 2020 01:22 PM
    Hi Sumeet,
    The "Apply Rate Limit" assertion might be a better fit here. In your case, I would set the Max requests per second to a variable that can be set based on the client. Then you can set the "Limit each" to "Custom" and have that be a unique identifier for your client.