views:

51

answers:

0

I'm using C# .NET 4 and MSSQL.

The code uses WebRequest to download the html of different websites. The code is multi threaded.

I want to limit the number of requests per mintue for a pre-defined list of domains.

For example

Domain: www.domain1.com Request Per Min : 5

Domain: www.domain2.com Request Per Min : 20

i saw some questions/topics that recommended to implement a "leaky bucket". I'm just not sure how to do that.

Thx!