[Apiman-user] Transfer Quota Policy

Eric Wittmann eric.wittmann at redhat.com
Wed Jun 1 12:25:52 EDT 2016


Thanks for the question Subba.

Because apiman streams the data in both directions, we don't necessarily 
know whether a response will violate the transfer quota policy (at the 
time the policy is being applied).  Here is the sequence of events:

1) receive HTTP request
2) apply Policy to request
3) connect to back-end API
4) stream data from originating client to back-end API
5) receive HTTP response from back-end API
6) apply Policy to response
7) stream data from back-end API to originating client
8) record # of bytes transferred, update counter

So if the number of bytes from #7 exceeds the allowed amount, it will 
still pass (but the *next* request will fail).  There is also a race 
condition where multiple concurrent requests could all get past step #6.

This is all done this way for performance reasons.  If you are in need 
of a stricter approach, we would need to discuss how that could be built.

-Eric


On 6/1/2016 10:47 AM, Subbarao Denduluri wrote:
> Hello Eric,
>
>
>
>    We are trying to configure the transfer quota policy at the client
> app level.  When we give the policy to a lower level of 2 KB ,  the
> first couple of request are going through even if they return a larger
> amount of data.   How do we interpret the download data limit ? Is it
> size of the json the api is returning or something else?
>
>
>
> Thanks
>
> Subba
>


More information about the Apiman-user mailing list