[Apiman-user] Transfer Quota Policy

Ashish Patel ashish.patel at futuregroup.in
Thu Apr 5 01:59:48 EDT 2018


Thanks very much Jakub, for explaining it in detail – I understand that – will do more testing.

Our main requirement is to restrict consumers with Transfer Quota (say 6000 bytes), for all the requests (meaning reset never happens) – believe this we can achieve with “6000 Bytes” of “upload” data per “API” per “Month” / “Year”.  In my below test, it was getting reset every second and I was not getting desired result.

Thanks & Regards,
Ashish Patel


From: Jakub Čecháček [mailto:jcechace at gmail.com]
Sent: Saturday, March 31, 2018 22:48
To: Ashish Patel
Cc: apiman-user at lists.jboss.org; Marc Savy
Subject: Re: [Apiman-user] Transfer Quota Policy

Hello Ashish,

if I understand correctly you are confused why the request passes the first time while it gets denied the second time?
Simply the way this policy works is that it blocks all consecutive requests after the one which went over the quota util reset. Meaning we don't terminate requests in the middle.

Worst case this can means that with a limit of 1000 bytes you can do a first request with 999 bytes and still send a second one with 1000 bytes -- next one is guaranteed to be blocked though.


Regards,
Jakub.

On Thu, Mar 29, 2018 at 6:46 AM, Ashish Patel <ashish.patel at futuregroup.in<mailto:ashish.patel at futuregroup.in>> wrote:
Hi Marc,

Sorry for sending direct mail, can you please help release below mail sent to group to all the audience ?

Thanks & Regards,
Ashish Patel


From: Ashish Patel
Sent: Friday, March 23, 2018 16:47
To: apiman-user at lists.jboss.org<mailto:apiman-user at lists.jboss.org>
Subject: Transfer Quota Policy

Hi,

I need small help understanding Transfer Quota policy.

Have applied transfer quota policy with below config – attached with one API , set up one client and tested with Rest Client.

“6000 Bytes” of “upload” data per “API” per “Second”.


1.       Sent single request which has request payload (upload) > 6000 bytes – Instead of blocking it, it allowed the request and sent the response – However, Apiman is aware of the overshot transfer – can be seen from the Headers.

x-transferquota-limit →6000
x-transferquota-remaining →-4019
x-transferquota-reset →0



2.       Sent back to back multiple request (same payload as above) and at times it failed with failure code : 10013, "Transfer quota exceeded.". This means it is applying the policy but after some requests , not sure how many.

x-policy-failure-code →10013
x-policy-failure-message →Transfer quota exceeded.
x-policy-failure-type →Other
x-powered-by →Undertow/1
x-transferquota-limit →6000
x-transferquota-remaining →-4019
x-transferquota-reset →0


Any idea, why it’s not failing in #1 scenario – Ideally it must fail in all requests as payload size is greater than defined.

Thanks & Regards,
Ashish Patel


_______________________________________________
Apiman-user mailing list
Apiman-user at lists.jboss.org<mailto:Apiman-user at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/apiman-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/apiman-user/attachments/20180405/1a68880e/attachment-0001.html 


More information about the Apiman-user mailing list