NetTCPBinding

Jakob Aagesen 1 Reputation point
2021-03-27T09:49:55.6+00:00

hi
I have searched high and low for answer to this problem.
I have two services that uses NetTCPBinding to communicate to each other. Now i have the services running on the same windows server 2016 and i see a problem.

The way the communication works, is that one service creates a pool of many net tcp connections to the other service. So when service A starts up it tries to make as many connections to service B as possible.
But i am running into a problem that service A will reach 400 connections and after that subsequent connection attempts time out.
The weird thing about this, is that i have hit the same limit running the both services on a different machine, so this looks like it is a general problem or at least it follows the code.
As i understand it, it cannot be af tcp connection limit because that is 65534.
If the services was on different servers each connection would count for 1 per server.
Connections are made to localhost. Does that mean that each connection between the two services, counts for 2 connections, making the total connection count 800, by the time it stoppes?
Is there anything i should keep in mind when trying to make many connection as fast as possible?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,346 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,083 questions
{count} votes