throttling

Best way to implement request throttling in ASP.NET MVC?

We're experimenting with various ways to throttle user actions in a given time period: Limit question/answer posts Limit edits Limit feed retrievals For the time being, we're using the Cache to simply insert a record of user activity - if that record exists if/when the user does the same activity, we throttle. Using the Cache automa...

Bandwidth throttling in C#

I am developing a program that continually sends a stream of data in the background and I want to allow the user to set a cap for both upload and download limit. I have read up on the token bucket and leaky bucket alghorhithms, and seemingly the latter seems to fit the description since this is not a matter of maximizing the network ban...

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...

WCF Service Throttling

Lets assume that I'm dealing with a service that involves sending large amounts of data. If I implement this with WCF, will WCF throttle the service based on how much memory each request takes to serve? Or will I be getting continuous out of memory exceptions each time I receive a large number of hits to my service? I'm quite curious a...

How can I implement server-side rate limiting for a Perl web service?

I have a Perl-based CGI/Fast CGI web service and want to rate-limit clients by IP address to stop aggressive clients causing too much work. I have looked around for some code and found Algorithm::TokenBucket in CPAN but that is for client requests; it has no persistence and has no per-user config so is not really useful for server-side ...

How can I throttle a download in a Perl program?

Is there any Perl module available for download throttling? I would like to download a certain file but limit the download rate to a specific number of KB/sec . ...

Throttling login attempts

(This is in principal a language-agnostic question, though in my case I am using ASP.NET 3.5) I am using the standard ASP.NET login control and would like to implement the following failed login attempt throttling logic. Handle the OnLoginError event and maintain, in Session, a count of failed login attempts When this count gets to [s...

Simulate delayed and dropped packets on Linux

I would like to simulate packet delay and loss for UDP and TCP on Linux to measure the performance of an application. Is there a simple way to do this? ...

throttling control in Windows Media Service

Hello everyone, I am wondering whether on Windows Server 2003, in Windows Media Service, we could setup/configure throttling settings for any file types (even the file types not supported by streaming by Windows Media Service), for example, setup .flv file download/streaming throttling bit rate to 100k or setup the bitrate throttling co...

What limits WCF ServiceModelService.Instances?

I'm attempting to load test a WCF service with (IIS6/Server2003/BasicHttpBinding). The service is throttled as follows: <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100" maxConcurrentInstances="100"/> To assess the number of calls on the server I'm using the ServiceModelService 3.0.0.0 performance counters. If ...

C# WCF: WCF stops responding after about 10 or so calls (throttling)

I have a WCF Service and an application with a Service Reference to it, and with the application I have a loop and in each iteration it's making a call to a method in this wcf web-service. The problem is that after about 9 calls or so, it just stops...and if you hit Pause button of VS, you will see that it's stuck on the line where it m...

How to delay / throttle login attempts in ASP.NET?

I'm trying to do some very simple request throttling on my ASP.NET web project. Currently I'm not interested in globally throttling requests against DOS attacks, but would like to artificially delay the reponse to all login attempts, just to make dictionary attacks a bit harder to do (more or less like Jeff Atwood outlined here). How wo...

WCF: How do I add a ServiceThrottlingBehavior to a WCF Service?

I have the below code for returning back an instance of my WCF Service ServiceClient: var readerQuotas = new XmlDictionaryReaderQuotas() { MaxDepth = 6000000, MaxStringContentLength = 6000000, MaxArrayLength = 6000000, MaxBytesPerRead = 6000000, MaxNameTableCharCount = 6000000 }; ...

Forcing asmx web service to handle requests one at a time

I am debugging an ASMX web service that receives "bursts" of requests. i.e., it is likely that the web service will receive 100 asynchronous requests within about 1 or 2 seconds. Each request seems to take about a second to process (this is expected and I'm OK with this performance). What is important however, is that each request is dea...

WCF Concurrent requests piling up on the server when using WSHttpBinding

I have a WCF client/server app which is communicating over HTTP using the WSHttpBinding. Server Setup: self-hosting, using the standard WCF ServiceHost. My actual service class is attributed as: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Multiple, InstanceContextMode = InstanceContextMode.PerSession, UseSynchronizationConte...

How to programatically limit bandwidth usage of my c# windows forms application

Hi, I've got a backup application here which connects to various webservices and downloads/uploads files from ftp or http servers. What is the easiest way to limit the bandwidth usage of my application? I need to do that because the application once installed and running will be slowing down internet access for all office people, which...

Service too busy error in WCF

I intermittently get the following exception in my .Net WCF Service. "The HTTP service located at http://MyServer/TestWCF/MyService.svc is too busy." Am I missing something here? Am using basic http binding and have enabled WCF throttling. <basicHttpBinding> <binding name="BasicHttpBinding_MyService" maxReceivedMessageSize="21...

Suggestions for uploading very large (> 1GB) files

I know that such type of questions exist in SF but they are very specific, I need a generic suggestion. I need a feature for uploading user files which could be of size more that 1 GB. This feature will be an add-on to the existing file-upload feature present in the application which caters to smaller files. Now, here are some of the opt...

Best way to throttle email on Windows Server 2008

I have a server with SMTP set up for my site's outbound email. In order to not get blacklisted I'd like to limit outbound emails to under an arbitrary threshold (let's say 500 per hour). What's the best way to implement this? The two possibilities I see would be: 1) Some sort of outbound throttling within the SMTP Virtual Server (Not...

Throttling CPU/Memory usage of a Thread in Java?

I'm writing an application that will have multiple threads running, and want to throttle the CPU/memory usage of those threads. There is a similar question for C++, but I want to try and avoid using C++ and JNI if possible. I realize this might not be possible using a higher level language, but I'm curious to see if anyone has any idea...