Reputation: 777
my App uses the .NET 4.5 HTTPClient sending Keep Alive header over this:
Client.DefaultRequestHeaders.Add("Keep-Alive", "true");
By far, the HttpClient just worked and the speed was ok, but I recently discovered in a test program(it sends as much request as possible over multiple threads to a https server and outputs the requests per second rate to test performance)that its around 3 times faster when fiddler is running, even without the reuse connection option(no difference).
I researched about this topic, but there were only hints pointing to the keep-alive header&reuse connection option, so my question is: Whats the point fiddler speed ups the app and what I`ll have to change in my code to make the requests faster.
Any help will be greatly appreciated.
(pls add a comment if there are more informations needed)
Upvotes: 3
Views: 1021
Reputation: 777
OK I just got the error after looking up to the similiar webclient: so if you have probs like me, just add a ServicePointManager.DefaultConnectionLimit = 300; // or sth
before you re doing request in your code.
Upvotes: 2