ServicePointManager.DefaultConnectionLimit as a worker

Just find out about Windows Azure for now.

I look through several samples and in the OnStart Event of the working role that I see

ServicePointManager.DefaultConnectionLimit = 5;

I do not understand the significance of this.

In your working role, can you set the number of instances so that it limits the number of records?

Sorry, I'm confused.

+6
source share
2 answers

We encountered a problem similar to this team in our team. By default, the default number of outgoing connections for each domain is set to 2 by default. This limits the number of concurrent connections that you can have, and can cause performance problems. I would take a look at the blog below which details the issue.

http://blogs.msdn.com/b/jpsanders/archive/2009/05/20/understanding-maxservicepointidletime-and-defaultconnectionlimit.aspx

In terms of setting the number of instances, although it is possible to reduce the number of instances running inside Azure, simply scaling will not eliminate bottlenecks in one instance.

+8
source

This option is most directly applied to Windows Azure Storage. You have a host endpoint (e.g. .table.windows.core.net) that will be limited to only two connections if you do not set this policy. However, if you know about Windows Azure storage, then you know that you achieve scalability by parallelizing queries. In this case, you want a lot of simultaneous connections. In our environment, where we have extreme partitioning and many operations related to IO, we have this limit of about 100, IIRC.

+3
source

Source: https://habr.com/ru/post/913764/


All Articles