Azure: increase # of connections

Updated . Posted . Visible to the public.
public WorkerRole()

{
 
  ServicePointManager.DefaultConnectionLimit = 5000; // default settings only allows 2 concurrent requests per process to the same host
  ServicePointManager.UseNagleAlgorithm = false; // optimize for small requests
  ServicePointManager.Expect100Continue = false; // reduces number of http calls
  ServicePointManager.CheckCertificateRevocationList = false; // optional, only if you trust all your dependencies
 
}

if not set BEFORE any IO takes place, these values are not taken into account. Therefore, using in Role ctor is a good place.

Sean Feldman
Last edit
Sean Feldman
Tags
Posted by Sean Feldman to Sean Feldman's deck (2015-01-08 22:56)