1

I want to create a WCF Rest service, which will be polled by other platform. I want to limit the no of polls they make, so that my service doesn't hangup. Also automatically reject the polls if they exceed their limit. Is there a way in WCF to do that?

Sumit Kadam
  • 79
  • 2
  • 6

1 Answers1

0

The phrase you're looking for here is Rate limiting. And there's no built-in way. You can play with the WCF feature set around service throttling, but this is a service-level setting and not per-client.

In order to implement rate limiting the guidance seems to be to use an in-memory hashtable or cache to perform fast look-ups against the incoming IP address. Then you can define some algorithm around that information.

More info here and here.

Community
  • 1
  • 1
tom redfern
  • 30,562
  • 14
  • 91
  • 126