Questions tagged [rate-limiting]

Rate limiting is used to control the rate of traffic sent or received on a network interface.

Traffic that is less than or equal to the specified rate is sent, whereas traffic that exceeds the rate is dropped or delayed. Rate limiting is performed by policing (discarding excess packets), queuing (delaying packets in transit) or congestion control (manipulating the protocol’s congestion mechanism). Policing and queuing can be applied to any network protocol. Congestion control can only be applied to protocols with congestion control mechanisms, such as the transmission control protocol (TCP).

1053 questions
0
votes
1 answer

What does annotate mean at a request rate limiter

I'm using Django Ratelimit to limit the rate my views can be called by an IP. But I don't know what the parameter block means, documented here. When I set it to True, I get a 403 when my rate limit is exceeded. But I don't understand what happens…
user1383029
  • 1,685
  • 2
  • 19
  • 37
0
votes
1 answer

Should I consider rate limiting my REST APIs?

I am in the process of creating a product where users can use both a mobile app and browser. The APIs are exposed as REST calls. As of now these REST APIs will not be called by any third party. Should I consider rate limiting API calls?
coder007
  • 3
  • 3
0
votes
2 answers

Limit the rate of requests to an API in a CGI script

The script that I'm writing sometimes makes requests to an API and the API requires that requests are limited to a maximum of 1 per second. What is the most straight forward way of limiting my requests to the API to 1 every second? Would it involve…
Acorn
  • 49,061
  • 27
  • 133
  • 172
0
votes
0 answers

Rate limit PHP REST API endpoint with many rules - which database to use?

I have to rate limit PHP REST API endpoint. Each request is already made with unique client/customer id. I have to be able to add following rules: rate limit per 5min (last 5 min at any time) rate limit per hour (last 60 min at any time) rate limit…
user606521
  • 14,486
  • 30
  • 113
  • 204
0
votes
4 answers

Is there a Java Lock implementation with timeouts

I have a spring application which can run in a clustered environment. In that environment I use Redis (and Redisson) as a distributed lock-service. Many of the locks are used to e.g. protect certain tasks which can only run once at a time, or which…
0
votes
3 answers

jQuery/AJAX set timeout when rate limit of 3rd party API is reached

In my app I make several nested AJAX calls to the LiquidPlanner API that limits requests to 30 requests every 15 seconds. When I hit the limit, I want to set a timeout of sorts to stop sending requests to the API until the 15 seconds have elapsed.…
Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
0
votes
1 answer

How to know only n number of threads running per second using RateLimiter

I am doing a simple demo implementation to understand RateLimiter. I did a simple class, it showing multiple threads running in a second. If you check in output, 2nd Second, it showing thread-6 also started without completion of thread-2 and…
Kumar
  • 33
  • 1
  • 9
0
votes
1 answer

Maximizing Twitter's rate limit to log followers

Twitter API has a rate limit of 15 requests per 15 minutes. I am trying to use python to run through and compile a list of my followers, but for some reason, the rate limit maxes when only 300 followers are logged. I've read that the max should be…
auto
  • 1,062
  • 2
  • 17
  • 41
0
votes
1 answer

How to manage rate limiting with twitter in node js?

I have been working with the twitter api. I am trying to log some tweets from a group of accounts. There are 250 accounts that I am tracking. This of course exceeds the rate limit. The code for the data collection is below: docs.forEach(function…
Aidan Collins
  • 215
  • 2
  • 3
  • 8
0
votes
1 answer

Twitter rate limiting confusion?

So I'm currently using NodeXL to get search for a particular Twitter hashtag, and I'm having trouble on understand how exactly the rate-limiting works. I looked it up in Twitter's API Rate Limits page, and also this SO post, but even after reading…
ocean800
  • 3,489
  • 13
  • 41
  • 73
0
votes
1 answer

Django ratelimit for simple authentication returns no reverse match

My goal is to implement some solution for limiting login attempts for a large django site. This is the template error that is being returns when I attempt to login with correct/incorrect credentials. I'm using the django-rate-limit…
0
votes
0 answers

How to rate limit messages on SockJS (Node.JS)

I'm working on a chat project based on Node.JS + SockJS (https://github.com/IgorAntun/node-chat) and I'm not sure on how to implement a rate limit so clients can't spam/flood the servers. Example: User X sent over 5 messages in less than Y seconds,…
Igor Antun
  • 116
  • 1
  • 2
  • 14
0
votes
1 answer

How to make KnockoutJS throttle/ratelimit work conditionally?

My webpage has toolbars (top & bottom), which gets visible the moment user moves mouse near the top/bottom edge. And when its moved away toolbars become invisible. I would like to make toolbar visible instantly but hides after 3 second delay. The…
Sharjeel Ahmed
  • 285
  • 6
  • 18
0
votes
3 answers

Rate-limit calls to an IRC bot

I am working on a IRC bot that has the command !Scouter and it will generate a random number.... I already have that done, what I wanted to make was a cool down system to keep from people spamming it over and over again. here is my code. public…
nyanchan
  • 3
  • 3
0
votes
1 answer

How can I rate limit a function in Python 2.7 with a decorator?

I'm trying to write a decorator in Python to limit the number of times a function is called in an amount of time. I anticipate using it like this: @ratelimit(seconds=15) def foo(): print 'hello' start = time.time() while time.time() - start <…
nickponline
  • 25,354
  • 32
  • 99
  • 167