Questions tagged [throttling]

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

1092 questions
13
votes
5 answers

javascript/jquery - add debounce to a button

I want to add a debounce to a button, but i want to perform some actions each time user clicks button, but only after 5 second after user hits button, then perform SQL update. Usually the throttle seems to be applied directly to the listener. Here…
george
  • 4,119
  • 3
  • 17
  • 18
13
votes
1 answer

purpose of Azure iot hub device-to-cloud partitions

When creating a new Azure IOT Hub you are asked how many device-to-cloud partitions you need. You can select between 2-32 partitions for standard tiers. I understand that the SKU and number of units determine the maximum daily quota of…
GHariz
  • 336
  • 2
  • 11
13
votes
2 answers

Throttling in Bokeh application

I have Bokeh application with a Slider widget that uses the Slider.on_change callback to update my graphs. However, the slider updates come in much faster than my callback function can handle so I need a way to throttle the incoming change requests.…
Emile
  • 2,200
  • 27
  • 36
13
votes
2 answers

Pausing an actor in Akka

I have an actor in Akka that will process messages to create certain entities. Some fields on these entities are computed based on the state of other entities in the database at the moment of creation. I would like to avoid creating a race condition…
Andrea
  • 20,253
  • 23
  • 114
  • 183
12
votes
7 answers

How to throttle login attemps in Java webapp?

I want to implement an efficient mechanism to throttle login attemps in my Java web application, to prevent brute-force attacks on user accounts. Jeff explained the why, but not the how. Simon Willison showed an implementation in Python for Django:…
Jörn Zaefferer
  • 5,665
  • 3
  • 30
  • 34
12
votes
1 answer

Throttle # of requests per user (with rack-attack & devise)

I'm using https://github.com/kickstarter/rack-attack/#throttles to throttle request to certain url's. Rack-attack docs show how to throttle by request IP or request parameters, but what I'd like to do is throttle requests per user. So no matter the…
ddgd
  • 1,657
  • 1
  • 15
  • 25
12
votes
2 answers

RabbitMQ: throttling fast producer against large queues with slow consumer

We're currently using RabbitMQ, where a continuously super-fast producer is paired with a consumer limited by a limited resource (e.g. slow-ish MySQL inserts). We don't like declaring a queue with x-max-length, since all messages will be dropped or…
Peter V. Mørch
  • 13,830
  • 8
  • 69
  • 103
12
votes
2 answers

Simulating an individual script timeout (or slow load) with Chrome DevTools

I am trying to work out how to use Google Chrome DevTools to simulate a timeout on a JavaScript file on my site. I can use the 'Toggle Device Mode' to introduce throttling but that doesn't target a specific script. Is there a way to do this with…
crmpicco
  • 16,605
  • 26
  • 134
  • 210
12
votes
6 answers

Can I throttle requests made by a distributed app?

My application makes Web Service requests; there is a max rate of requests the provider will handle, so I need to throttle them down. When the app ran on a single server, I used to do it at the application level: an object that keeps track of how…
Leonel
  • 28,541
  • 26
  • 76
  • 103
12
votes
3 answers

Efficiently using a rate-limited API (Echo Nest) with distributed clients

Background Echo Nest have a rate limited API. A given application (identified in requests using an API key) can make up to 120 REST calls a minute. The service response includes an estimate of the total number of calls made in the last minute;…
andrew cooke
  • 45,717
  • 10
  • 93
  • 143
11
votes
6 answers

underscore throttle + ensure last call

Underscore provides the method, throttle. From their docs: Creates and returns a new, throttled version of the passed function, that, when invoked repeatedly, will only actually call the original function at most once per every wait milliseconds.…
Peter Ehrlich
  • 6,969
  • 4
  • 49
  • 65
11
votes
2 answers

Lambda throttling below concurrency limit

We use Lambda to power APIs (via API Gateway) accessed via news media websites, receiving a fluctuating but high load of traffic. We began experiencing throttles, so we raised our concurrency limit to 2000. However, we still experience throttles…
11
votes
1 answer

Avoid app throttling when Electron is in background

Consider the following example: setInterval(function() { console.log(new Date()); }); If I run it with electron example.js under OS X, it opens up an icon in my dockbar and starts printing out the time on the console. If the app is not focused,…
Matteo Monti
  • 8,362
  • 19
  • 68
  • 114
11
votes
3 answers

Django REST Framework: Per-user throttles

I have users that need really high throttles so they can use the system a lot. Is there an easy way to give them higher throttles than the rest of the users? I've looked around but haven't found anything.
mlissner
  • 17,359
  • 18
  • 106
  • 169
11
votes
3 answers

Custom throttling response in django rest framework

I am using DRF for rest apis so now i am applying throttling to my apis. For that I created following throttle scopes userRateThrottle anonRateThrottle burstRateThrottle perViewsThrottles (varies with view) currently i getting below response: …
Ajeet Lakhani
  • 3,768
  • 2
  • 22
  • 37