advanced quota

deniska
Participant V

Hi community, I got an interesting case, need your creativity for this one.

Got support answer that this is not supported, but I'm sure we can figure something out.

My goal is to create qouta counter, but with not round numbers, for example I want to create quota with 1.2 calls per second, or 1.1 or something 'float' Any ideas maybe how to fight this mathematically or with some sort of development?

Thanks in advance

0 3 241
3 REPLIES 3

Not applicable

In case of spike arrest the calculation in float is easy as that works in a different way.

But here you have asked about quota. In quota the lowest unit is minute.

To make float value, mathematically, you can do something like 5 requests per 3 minutes. This will be a float value.

But logically if you see, there is no request part of 1 in reality. The request always is a counted value of 1.

Hi Denis, can you elaborate a bit on the need to do this? As clients cannot do 0.2 calls I can't think of why you'd want to have fractions involved.

Anyway, a creative way to look at this would be to have a quota of 12 and then use the MessageWeight element of say 10 to achieve this.

yes that would approximate it.

Another possible approach would be to use a larger interval. The Quota policy accepts count, interval, and timeunit for configuration parameters. Count is the number of requests. Timeunit is a thing like minute, hour, day. The interval is the number of timeunits. 1 day, 3 hours, etc. Many people implicitly assume the interval is always 1, but it need not be.

Rather than 1.2 requests (count) for 1 (interval) minute (timeunit), you could configure 12 requests for 10 minutes. This isn't a fraction either, but maybe it's ok, as it's not possible for a client to submit a partial request. With a large number of requests, this may give you what you want.