[Apiman-user] Impact of adding extra fields in Rate Limiting Policy

Marc Savy marc.savy at redhat.com
Fri Jan 13 08:33:58 EST 2017


Hi,

Just to understand:

All you display in this header is a fixed value of, for instance,
X-Retry-Time: 50000 - it's not a calculated value?

If so, then assuming things are wired up correctly this should work fine.

Apiman is split into two parts, the manager and the gateway, which have
*separate* data-stores for typical decoupling reasons (performance,
reliability, etc).

- Before publishing config will be in the manager only.
- After publishing config will be in the manager and gateway.

So, if your manager uses ElasticSearch the config will be in the
ElasticSearch.  If your gateway the config will also be in ElasticSearch
but a different "region". However one could be Infinispan and another
ElasticSearch.

Regards,
Marc

On 13 January 2017 at 12:54, <Ram.Tanna at ril.com> wrote:

>
>
> Dear Team,
>
>
>
> I have added 2 extra fields in Rate limiting Policy, as shown in the below
> image.
>
>
>
> These extra fields are added because I need it in response header in
> success(200) as well as failure(429) responses.
>
>
>
> To do so I have modified below mentioned files,
>
> *1.       **rate-limiting.include*
>
>
>
> <div>
>
>   <span>I want to set retry time to</span>
>
>     <input id="time-limit" ng-model="config.retryTime" class="form-control
> inline-apiman-form-control form-control" style="width: 100px" type="text"
> apiman-i18n-key="rate-limiting.enter-num-requests" placeholder="Time
> limit" ng-disabled="isEntityDisabled()"></input>
>
>
>
>     <select id="retryTimeUnit" ng-model="config.retryTimeUnit"
> apiman-select-picker="" data-field="retryTimeUnit" class="selectpicker
> inline-line apiman-inline-form-dropdown" data-style="btn-default
> apiman-inline-form-dropdown" style="width: 100px"
> ng-disabled="isEntityDisabled()">
>
>       <option value="Second" data-content="<span
> class='apiman-label-faded'>Second</span>" apiman-i18n-key="rate-
> limiting.second">Second</option>
>
>       <option value="Minute" apiman-i18n-key="rate-
> limiting.minute">Minute</option>
>
>       <option value="Hour" apiman-i18n-key="rate-
> limiting.hour">Hour</option>
>
>       <option value="Day" apiman-i18n-key="rate-limiting.day">Day</option>
>
>       <option value="Month" apiman-i18n-key="rate-
> limiting.month">Month</option>
>
>       <option value="Year" apiman-i18n-key="rate-
> limiting.year">Year</option>
>
>     </select>
>
>                 </div>
>
>
>
> *2.       **RateLimitingConfig*
>
> private long retryTime;
>
>                private RateLimitingPeriod retryTimeUnit;
>
> -- getter , setters
>
>
>
> *3.       **RateLimitingPolicy*
>
> responseHeaders.put("X-Retry-Time", timeLimit);
>
>
>
>
>
> Kindly Confirm,
>
> -          Where are we storing these information ? In Elastic Search, in
> SQL  or somewhere else ?
>
> -          Will these changes make any impact on other components ?
>
> -          Would you recommend this code change ?
>
>
>
> Kindly suggest if you have any other solution for similar requirement.
>
>
>
>
>
>
>
>
>
> Regards,
>
> Ram Tanna
>
> 9819002243
>
>
> "*Confidentiality Warning*: This message and any attachments are intended
> only for the use of the intended recipient(s), are confidential and may be
> privileged. If you are not the intended recipient, you are hereby notified
> that any review, re-transmission, conversion to hard copy, copying,
> circulation or other use of this message and any attachments is strictly
> prohibited. If you are not the intended recipient, please notify the sender
> immediately by return email and delete this message and any attachments
> from your system.
>
> *Virus Warning:* Although the company has taken reasonable precautions to
> ensure no viruses are present in this email. The company cannot accept
> responsibility for any loss or damage arising from the use of this email or
> attachment."
>
> _______________________________________________
> Apiman-user mailing list
> 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/20170113/6872502d/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 62442 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/apiman-user/attachments/20170113/6872502d/attachment-0001.png 


More information about the Apiman-user mailing list