[Apiman-user] Transfer Quota Policy
Subbarao Denduluri
sdenduluri at ebsco.com
Wed Jun 1 13:06:04 EDT 2016
Thank you Eric for the response. That explains the scenario.
-Subba
-----Original Message-----
From: Eric Wittmann [mailto:eric.wittmann at redhat.com]
Sent: Wednesday, June 01, 2016 12:26 PM
To: Subbarao Denduluri <sdenduluri at ebsco.com>; apiman-user at lists.jboss.org
Subject: Re: Transfer Quota Policy
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