I have an asp.net app that uses Lucene.NET for search, backed by Azure blob storage. It's multi-tenanted with a separate search index per tenant. Lucene uses AzureDirectory library which uses Azure Storage which uses HttpWebRequest (presumably). Various articles that I've been reading say if you're making concurrent outgoing web requests you should tune such parameters as ServicePointManager.DefaultConnectionLimit (to allow more than 2 simultaneous outgoing connections to the same host). Since we'll have multiple Lucene writers we'll have multiple threads at times simultaneously trying to save stuff to Azure Blob storage. So I assume the tuning advice around outgoing HttpWebRequests applies in this case. But I thought I'd check on this, since it seems like quite a fundamental limit otherwise when using something quite fundamental like Azure Storage.
Asked
Active
Viewed 732 times
1
-
This has been asked before - such as [here](http://stackoverflow.com/questions/5760403/what-to-set-servicepointmanager-defaultconnectionlimit-to). This really needs to be benchmarked by you to see if it makes a difference, but often the suggestion is to set it higher than 2. – David Makogon May 14 '16 at 22:40
-
It seems like ASP.NET from IIS 7.5 (or is it from a .net version?) sets DefaultConnectionLimit to Int32.MaxValue, so this is probably not something to worry about any more when running from ASP.NET, although might be for other apps. – Rory May 15 '16 at 20:26
-
A useful article https://blogs.msdn.microsoft.com/ncl/2009/08/07/new-performance-counters-for-httpwebrequest/ about performance counters that can be turned on for HttpWebRequest – Rory May 15 '16 at 20:26