throttle

CPU throttling in C++

I was just wandering if there is an elegant way to set the maximum CPU load for a particular thread doing intensive calculations. Right now I have located the most time consuming loop in the thread (it does only compression) and use GetTickCount() and Sleep() with hardcoded values. It makes sure that the loop continues for a certain peri...

Tool for degrading my network connection?

I've written some applications than heavily use network, and I would to test it over a slow network. I'm looking for a tool to simulate this kind of connections. Edit: I'm only interested in Windows tools ...

Bandwidth throttling for Apache<2.2 on Windows (mod_throttle?)

Hey there Does anyone know of a windows build of mod_throttle for Apache 2.2 or lower? Or perhaps another means by which to throttle bandwidth. I need to throttle as low as 64k for a local speed test demonstration Preferably Apache rather than a browser plug-in too. Thanks! ...

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: That doesn't really help me along as I can't use memcached nor Django. Porting his ide...

How do I throttle my site's API users?

The legitimate users of my site occasionally hammer the server with API requests that cause undesirable results. I want to institute a limit of no more than say one API call every 5 seconds or n calls per minute (haven't figured out the exact limit yet). I could obviously log every API call in a DB and do the calculation on every request...

Throttling method calls to M requests in N seconds

I need a component/class that throttles execution of some method to maximum M calls in N seconds (or ms or nanos, does not matter). In other words I need to make sure that my method is executed no more than M times in a sliding window of N seconds. If you don't know existing class feel free to post your solutions/ideas how you would im...

throttle connections to apache load balancer

I have a load balancer using apache: http://httpd.apache.org/docs/2.2/mod/mod%5Fproxy%5Fbalancer.html The problem is our bandwidth. We're trying to get more, but the ISP has to run new lines and keeps putting us off, so I'd like to throttle down the spiders to conserve bandwidth until we can get more. I tried mod cband, but it won't w...

Joystick values not correct

Hi, I have a problem with respect of getting the state of a steering wheel (Logitech Steering Wheel). It looks like it doesn't perceive the throttle - rglSlider[0] is always 0, even if the acceleration paddle is pushed. The others buttons work fine. Actually only rgbButtons, lX and lY members of DIJOYSTATE2 struct are changing when I am...

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 many requests have been made so far, and waits if the current request makes it exceeds the ...

Is there a way to throttle or limit resources used by a user in Oracle?

I have a multi-user web application and am encountering issues when a third party reporting application queries my Oracle 10g database. The reporting queries are slowing the system and impacting all other users. Is there a way to throttle this user's session so their queries don't impact the other users? ...

Rate limiting a ruby file stream

I am working on a project which involves uploading flash video files to a S3 bucket from a number of geographically distributed nodes. The video files are about 2-3mb each, and we are only sending one file (per node) every ten minutes, however the bandwidth we consume needs to be rate limited to ~20k/s, as these nodes are delivering str...

Pattern for limiting number of simultaneous asynchronous calls

I need to retrieve multiple objects from an external system. The external system supports multiple simultaneous requests (i.e. threads), but it is possible to flood the external system - therefore I want to be able to retrieve multiple objects asynchronously, but I want to be able to throttle the number of simultaneous async requests. i....

How to predict result set row count?

I have an application where I create a big SQL query dynamically for SQL server 2008. This query is based on various search criteria which the user might give such as search by lastname, firstname, ssn etc. The requirement is that if the user gives a condition due to which the formed query might return a lot of rows(configurable for max...

How to throttle or prioritize a query in MySql

Is there anyway to prioritize or throttle a query at all in MySQL? I'm a DBA on a server that sees a lot of unoptimized queries come into the server and they just destroy the CPU. I'm looking at throttling certain users that hit on the database in poor fashion. Clarification: I realize that MySQL has facilities built in to limit numbe...

what design pattern to use for multiple throttled api requests?

I'm writing a web site that uses multiple web services with throttle restrictions. I.e. Amazon is 1 request per second, another is 5000/day another is x/minute. When a user does something, I need to trigger one or more requests to the above services and return the results (to the browser) when available. The solution need to be flexibl...

How to test a web API throttle limit in Python

I would like to test a web API throttle limit of a given site using Python. This API throttle limit allows X requests MAX over Y seconds per IP. I would like to be able to test the reliability of this throttle limit, in particular on border cases (X-1 requests, X+1 requests) Could you suggest a good way to do it? ...

CCK fields disappear from Content type

Sometimes, during period of high traffic on sites, CCK input fields disappear while adding a content from the backend. I haven't enabled the throttle module. The fields are restored automatically at other times. For example - field for image upload, checkbox for featured for a content type News disappear during heavy traffic but get au...