Additionally, fyi, there’s an indirect rate limiting support inbuilt into the 
ATS core via limiting concurrent connections per origin. 

Refer ‘proxy.config.http.per_server.connection.max’ and 
‘proxy.config.http.per_server.connection.queue_size’.

You may want to check that out, and if it doesn’t fully address your use case, 
then yes, a plugin should be straightforward to implement.

- Sudheer

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