I have created a server product 开发者_开发百科that is connecting to some social network servers and sending to data which status update etc. The server already authenticated to necessary social networks servers by users who is using this solution.
Actually, I have no problem at this time, but I think I will.
My server will be open a thousands of concurrent request to neccessary servers via Http with C# HttpWebRequest instance. I already know that It's possible to change concurrent request limits with below propery.
ServicePointManager.DefaultConnectionLimit
AFAIK, this limit is max 100 evet you set more than 100.
So, I will be faced with bottleneck problem with HttpWebRequest even change the DefaultConnectionLimit property of ServicePointManager.
I would like know you guys what are you thinking about this. Do you have any suggestions ?
Ignoring whether or not this is a good idea, have you tried using a unique ConnectionGroupName for each request, e.g. Guid.NewGuid().ToString()? The connection limit is per connection group so this may help unless there is some global limit. You should disable KeepAlive unless you will be reusing the group names for subsequent requests. See my answer to HttpWebRequest How to handle (premature) closure of underlying TCP connection?.
精彩评论