Questions tagged [throttling]

Throttling is a mechanism to regulate the rate at which processing is performed

1092 questions
3
votes
1 answer

How can I limit multiple functions with the same throttle?

I want to limit the execution of two different functions with the same throttle. Let's say I have a function called A and another one called B. I want to limit the number of executions of both of them so that if A is called at time 0, and the limit…
mahmoudafer
  • 1,139
  • 3
  • 14
  • 30
3
votes
3 answers

how to debounce a final-form Field?

this is a pretty common query, but I am a bit confused with the new final-form library. I used to work with redux-form but this new version is too different. My need is simple, I want to dispatch a search as the user writes in some text, but I want…
3
votes
0 answers

Separate limit_req_status per zone - nginx throttling

I'm testing nginx rate limiting example. The directive limit_req_status can return a custom error message for requests that exceed the zone's rate limit. I've defined 2 zones (limit1 & limit2). Is it possible to return a different error message for…
user
  • 17,781
  • 20
  • 98
  • 124
3
votes
1 answer

Throttle is not working when using hooks setState

I am facing a problem when using throttle. Using the code below, throttle works properly. But, something goes wrong when I uncomment setPosition([e.clientX, e.clientY]). The throttle is broken and position is updated immediately without waiting for…
Ukasha
  • 2,238
  • 3
  • 21
  • 30
3
votes
0 answers

RxJava - Kotlin: Throttle the stream for same type of events

I have an array of integers a = [1, 2, 1, 2, 1 , 3, 4, 5, 6, 7, 1, 2] Assume that each integer is emitted after a gap of 100ms How is it possible to make sure that there is a gap of atleast 500ms between same integers being emitted. Ignore the…
Dinesh Singh
  • 727
  • 1
  • 10
  • 22
3
votes
3 answers

How can I rewrite one value in the settings for the test

How can I rewrite 'user': '5/minute' on 'user': '2/day' in the settings for the test REST_FRAMEWORK = { 'DEFAULT_THROTTLE_RATES': { 'user': '5/minute' } } How can i do this with @override_settings or mb with context manage? I need…
Roman Nozhenko
  • 698
  • 8
  • 21
3
votes
1 answer

Where Can I Find the Throttling Temperature and Shutdown Temperature for a CPU?

I am going to do some improvements to a Multi-Threaded program that I wrote, and after each improvement I would like to measure the results, by running the program for some time. Those tests will be CPU intensive, and since I compare each…
spaceman
  • 1,061
  • 1
  • 11
  • 31
3
votes
2 answers

django rest framework throttling per user and per view

i have two api view (django rest framework): class ApiView1(APIView): ... throttle_classes = (UserRateThrottle, ) and api 2: class ApiView2(APIView): ... throttle_classes = (UserRateThrottle, ) and my settings: REST_FRAMEWORK = { …
Hadi Farhadi
  • 1,773
  • 2
  • 16
  • 33
3
votes
1 answer

Best way to apply rate limit/throttling on multi processes API caller - using Celery

Here is the scenario: I have 10 Celery workers which send HTTP requests(via Requests) to an external API server. That API server has an API rate limit 1000 request/second. What I want to do is having a API request throttling on my side to avoid hit…
CK Chen
  • 625
  • 5
  • 15
3
votes
1 answer

Placing custom execution rate limits on AWS Step Functions

I have a Step functions setup that is spawning a Lambda function. The Lambda functions are getting spawned too fast and causing other services to throttle, so I would like Step functions to have a rate limit on the number of job it kicks off at a…
user3002273
3
votes
1 answer

aws dynamo db throughput

There's something which I cant understand about AWS DynamoDb throughput. Lets consider strongly consistent reads. Now, I understand that in this case, 1 unit of capacity would mean I can read up to 4KB of per second. It's the "per second" bit that…
3
votes
1 answer

React event listener with throttle not being removed

My code look something like this: componentDidMount() { window.addEventListener('resize', this.resize); } componentWillUnmount() { window.removeEventListener('resize', this.resize); } resize = () => this.forceUpdate(); This works fine.…
user2456977
  • 3,830
  • 14
  • 48
  • 87
3
votes
1 answer

How to catch "too many attempt" exception in a middleware Laravel 5

I am building my API and I successfuly managed to catch some errors on a middleware I set up around my routes like following : Route::group(['middleware' => \App\Http\Middleware\ExceptionHandlerMiddleware::class], function() { …
Anwar
  • 4,162
  • 4
  • 41
  • 62
3
votes
2 answers

Throttling API AJAX requests in Node (getting rate limited) - Using AXIOS for AJAX calls...

I am getting rate limited making too many requests per second to an API. I am importing contacts into my database and mapping the data to my DB's schema. The API initially returns its contact 'groups' (ie categories) as an array of links which need…
3
votes
2 answers

Apache/PHP test server throttle by request

I've recently set up a test server running in a virtual machine on my computer so I can do such things as interactive debugging with XDebug. For the most part it's pretty sweet, but I've run into a snag when running multiple requests to the server…
GordonM
  • 31,179
  • 15
  • 87
  • 129