I have implemented rate-limit in my plugin using atscppapi. We are using ats in 
security context for mitigation. If the request matches certain criteria (ip, 
method, host, uri and header values) then we apply rate-limit to that ip. 

Dk. 

> On Jun 21, 2019, at 3:15 PM, Leif Hedstrom <zw...@apache.org> wrote:
> 
> 
> 
>> On Jun 21, 2019, at 16:09, Weixi Li (BLOOMBERG/ PRINCETON) 
>> <wli...@bloomberg.net> wrote:
>> 
>> Hi team,
>> 
>> We are experimenting with ATS in *forward* proxy mode. Our use-case requires 
>> a rate-limiting component that enforces rules based on the destination. 
>> 
>> For example:
>> 
>> For all incoming requests targeting "www.cnn.com", we want to limit the 
>> outgoing rate to be 10 requests per minute; for "www.reddit.com", we want 
>> the rate to be 20 requests per minute; and so on. If there were more 
>> requests than the limit specified, the requests must be queued before they 
>> could go out. 
> 
> Seems very straight forward to implement as a plugin. For example the geo_acl 
> plugin might be a good start, since it limits access based on source IP.
> 
> Would be interesting to hear more about your use case too, it’s always 
> exciting to hear about different solutions that people use ATS for. Maybe at 
> the next ATS summit? :-)
> 
> Cheers,
> 
> — Leif 
>> 
>> Is it possible to implement this requirement using a plugin?
>> 
>> If not, we wouldn't mind forking the code and modifying whichever parts that 
>> would be necessary. But which are the potentially relevant components? 
>> 
>> If any experts could give us some pointers on the design, that would be 
>> really appreciated.
>> 
>> Thanks,
>> Weixi
> 

Reply via email to