rate-limiting

Quota counters : what makes them distinct? Are there additional filters on top of the Identifier field?

流过昼夜 提交于 2019-12-02 07:40:38
问题 Say within an API bundle, we have 3 different flows (e.g., flow A, flow B, and flow C), and they all reference the same Quota policy named QuotaLimitPolicy. Are they really using separate counters for a given Identifier? Flow A is executed -> QuotaLimitPolicy is executed. Result: "A counter" = 1 Flow B is executed -> QuotaLimitPolicy is executed. Result: "B counter" = 1 Flow A is executed -> QuotaLimitPolicy is executed. Result: "A counter" = 1 +1 = 2 Flow C is executed -> QuotaLimitPolicy is

Quota counters : what makes them distinct? Are there additional filters on top of the Identifier field?

纵饮孤独 提交于 2019-12-02 06:09:16
Say within an API bundle, we have 3 different flows (e.g., flow A, flow B, and flow C), and they all reference the same Quota policy named QuotaLimitPolicy. Are they really using separate counters for a given Identifier? Flow A is executed -> QuotaLimitPolicy is executed. Result: "A counter" = 1 Flow B is executed -> QuotaLimitPolicy is executed. Result: "B counter" = 1 Flow A is executed -> QuotaLimitPolicy is executed. Result: "A counter" = 1 +1 = 2 Flow C is executed -> QuotaLimitPolicy is executed. Result: "C counter" = 1 Flow A is executed -> QuotaLimitPolicy is executed. Result: "A

Paging on Google Places API returns status INVALID_REQUEST

♀尐吖头ヾ 提交于 2019-12-01 14:50:45
问题 I'm using the Google Place API for place search: https://developers.google.com/places/documentation/search After the first query of the api, I'm getting the next page by setting the pagetoken. If I wait 2 seconds between requests, it works, but I notice that if I make the next query right after the previous one, it returns the status INVALID_REQUEST. Is this some kind of rate limiting? I don't see this anywhere in the documentation. https://developers.google.com/places/usage Since each

advise controller method *before* @Valid annotation is handled

时光总嘲笑我的痴心妄想 提交于 2019-12-01 09:33:56
问题 I am adding rate-limiting to a restful webservice using Spring MVC 4.1. I created a @RateLimited annotation that I can apply to controller methods. A Spring AOP aspect intercepts calls to these methods and throws an exception if there have been too many requests: @Aspect @Component @Order(Ordered.HIGHEST_PRECEDENCE) public class RateLimitingAspect { @Autowired private RateLimitService rateLimitService; @Before("execution(* com.example..*.*(.., javax.servlet.ServletRequest+, ..)) " + "&&

Rate limiting to prevent malicious behavior in ExpressJS

烂漫一生 提交于 2019-12-01 03:54:40
Someone made me aware of some flaws in an application I'm working on (mostly within my JavaScript on the front-end), that leaves open the possibility of, say, clicking a ton of buttons at once and sending out a ton of transactional emails. This is clearly not good. I think one way to handle this in ExpressJS is by using app.all() to count the number of requests that happen within a certain timeframe. I'd store this in the session metadata with timestamps, and if more than X requests happen in Y time, I cut them off for awhile until the limit expires. Has anyone done this before or have any

Limiting/throttling the rate of HTTP requests in GRequests

半腔热情 提交于 2019-11-30 10:41:22
问题 I'm writing a small script in Python 2.7.3 with GRequests and lxml that will allow me to gather some collectible card prices from various websites and compare them. Problem is one of the websites limits the number of requests and sends back HTTP error 429 if I exceed it. Is there a way to add throttling the number of requests in GRequestes so that I don't exceed the number of requests per second I specify? Also - how can I make GRequestes retry after some time if HTTP 429 occurs? On a side

How do I implement rate limiting in an ASP.NET MVC site?

前提是你 提交于 2019-11-30 10:32:10
问题 I'm building an ASP.NET MVC site where I want to limit how often authenticated users can use some functions of the site. Although I understand how rate-limiting works fundamentally, I can't visualize how to implement it programatically without creating a major code smell. Can you point me towards a simple yet powerful solution for approaching such a problem, with C# sample code ? If it matters, all of these functions are currently expressed as Actions that only accept HTTP POST . I may

Block API requests for 5 mins if API rate limit exceeds using WebApiThrottle - C# Web API

让人想犯罪 __ 提交于 2019-11-30 10:31:20
There's a real nice library WebApiThrottle for API rate limiting in Web API. As mentioned on the Wiki page, I can rate limit the API based on the authorization token header of API call. But, how can I block the api call for the next 5 minutes if this api rate limit exceeds? Also, not that any request within next 5 minutes will reset the rate limiting exceeded time. I checked the code but couldn't find this feature. Any other way if someone can suggest? For the time being, I'm using this fork of WebApiThrottle and adding the dll manually to the solution. @adamriyadi has implemented this feature

Limiting/throttling the rate of HTTP requests in GRequests

淺唱寂寞╮ 提交于 2019-11-29 21:47:19
I'm writing a small script in Python 2.7.3 with GRequests and lxml that will allow me to gather some collectible card prices from various websites and compare them. Problem is one of the websites limits the number of requests and sends back HTTP error 429 if I exceed it. Is there a way to add throttling the number of requests in GRequestes so that I don't exceed the number of requests per second I specify? Also - how can I make GRequestes retry after some time if HTTP 429 occurs? On a side note - their limit is ridiculously low. Something like 8 requests per 15 seconds. I breached it with my

Examples of HTTP API Rate Limiting HTTP Response headers [closed]

↘锁芯ラ 提交于 2019-11-29 18:41:01
One of the Additional HTTP Status Codes ( RFC6585 ) is 429 Too Many Requests Where can I find examples of HTTP / REST API Rate-Limiting HTTP response headers that are useful with this HTTP response status? M8R-1jmw5r Here are some examples of HTTP API Rate Limiting HTTP Response headers. Taken from four common REST APIs: Github, Vimeo, Twitter and Imgur: Github Rate Limiting http://developer.github.com/v3/#rate-limiting #=============================#=============================================# # HTTP Header # Description # #=============================#=====================================