Throttling is a mechanism to regulate the rate at which processing is performed
Questions tagged [throttling]
1092 questions
6
votes
1 answer
Throttle async tasks?
I would like to know if we should throttle async tasks if the number of tasks to complete is big. Say you have 1000 URLs, do you fire all the requests at once and wait for all:
var tasks = urlList.Select(url => downloadAsync(url));
await…

Tuan Nguyen
- 305
- 2
- 10
6
votes
2 answers
Throttle a function call in python
I have the following type of code, but it is slow because report() is called very often.
import time
import random
def report(values):
open('report.html', 'w').write(str(values))
values = []
for i in range(10000):
# some computation
r…

j13r
- 2,576
- 2
- 21
- 28
6
votes
2 answers
How can I throttle uploads in Node.js / Express 4?
I would like to throttle file uploads in Express 4. By that I mean the bytes per second, not the number of API calls.
I want to be able to simulate a slow connection for file uploads so I can test out my progress animations.
I only want to limit…

Brennan Cheung
- 4,271
- 4
- 30
- 29
6
votes
5 answers
Throttling a Rest API in Java
I wanted to add a way to throttle the number of requests coming on each API from a certain client. So, I wanted to basically limit the number of requests per API per client.
I am using DropWizard as framework. Can somebody recommend the ways to…

hatellla
- 4,796
- 8
- 49
- 101
6
votes
1 answer
Concurrency in running Oozie workflow: how many and how to throttle
Let us say we have a Oozie workflow that has a copy action node then a Shell action node. Can I start multiple instances of such a OOzie workflow and run them in parallel? How about the concurrency number could spike to thousands and/or even…

user908645
- 317
- 2
- 3
- 14
6
votes
2 answers
nginx: how limit_req_zone zone gets cleared?
According to nginx documentation on limit_req_zone
One megabyte zone can keep about 16 thousand 64-byte states. If the zone storage is exhausted, the server will return the 503 (Service Temporarily Unavailable) error to all further requests.
I…

Andrey Bulygin
- 63
- 1
- 3
6
votes
1 answer
throttling http api calls with delay
I'm trying to implement some throttles on our REST API. A typical approach is after a certain threshold to block the request (with 403 or 429 response). However, I've seen one api that adds a delay to the response instead.
As you make calls to the…

gingerlime
- 5,206
- 4
- 37
- 66
6
votes
1 answer
Query optimization and API throttling
We are tracking Facebook Page and Post metrics for a number of clients, and we have some questions regarding high CPU intensity and too many calls for Post/comments - according to what is being reported by the developer insights console (Insights ->…

Andreas Lundberg
- 109
- 9
6
votes
4 answers
.NET's HttpClient Throttling
I'm developing a .NET4-based application that has to request third-party servers in order to get information from them. I'm using HttpClient to make these HTTP requests.
I have to create a hundred or a thousand requests in a short period of time. I…

Mauro Ciancio
- 436
- 5
- 18
5
votes
0 answers
Charles SSL throttle specific path or url
I got Charles working, and I know how to use it. I've done throttling before for the entire domain, but I have a need to throttle a specific path or url.
For reference, I can throttle this: https://www.example.com
What I want to throttle is:…

TooManyEduardos
- 4,206
- 7
- 35
- 66
5
votes
1 answer
How can I make a progressive login-rate throttle in Django?
I'm working on a Django/DRF app, and I'm trying to implement an API throttle that will have an increasingly-long delay for failed login attempts.
Eg. lock the user out for 1 minute after 3 failed attempts, 10 minutes after 6 fails, 30 minutes after…

Troy
- 21,172
- 20
- 74
- 103
5
votes
4 answers
Java Throttling
How do I use a combination of ScheduledThreadPoolExecutor, ScheduledFuture and ExecutorCompletionService to throttle Callable commands that accept a variable parameter? Upon receiving a response from a Callable command, I need to create a new…

syker
- 10,912
- 16
- 56
- 68
5
votes
1 answer
How to disable throttle in specific routes? (laravel)
Can we disable the laravel's throttle in a specific group of routes?
Here are my codes:
Route::group(['middleware' => ['auth:sanctum']], function () {
Route::get('/sample1', 'SampleController@sample');
// more routes here
});
I want to…

schutte
- 1,949
- 7
- 25
- 45
5
votes
2 answers
AWS API Gateway Throttling not working as expected
I'm trying to enable API Gateway throttling, but it's not working as expected.
I set Default Method Throttling Rate to 1 request per second, and Burst to 1 request.
Then I created a loop in my code to make 10 simultaneous requests to my API…

Daniel Barral
- 3,896
- 2
- 35
- 47
5
votes
2 answers
Implement Rate Limiting in NextJS
I learned ReactJS and NextJS, but I am having trouble implementing rate-limiting/throttling in NextJS. I want there to be a limit on the number of times the user can access certain requests per period of time.

CodeRocks
- 655
- 5
- 10
- 25