Found many students in use. NET when doing communication, all care about a problem. NET can support how many online connections. In fact. NET's communications are supported by WinSocket, since the limit of the number of access connections at the end of the. NET is completely limited by the WinSocket current operating system, as supported by the low-level winsocket.
A 65535 limit?
A lot of students think that because of the limited port, the connection will be restricted by port resources. In fact, the connection to the service end will not generate the allocation of port resources, it only assigns the appropriate operating system handle. Therefore, an accessible connection will not be limited by the number of ports. In fact, the maximum number of connections to win reservation can be connected to a very large value, through the following registry value can be learned
[HKEY_LOCAL_MACHINE \system \CurrentControlSet \services \TCPIP \parameters]
TcpNumConnections = 0x00fffffe (Default = 16,777,214)
The value is 1000多万个 access restrictions, of course, this is a value is actually the current operating system and memory resources to support so many instances of the handle is also difficult to say ... Because the connection is tightly connected to create and allocate the corresponding handle resources. If the memory is large enough to support a lot of connection number access, of course, also requires the operating system to support the management of so many instances of the handle.
Test
For some students said 6W connection to do a simple test
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/net/
Judging from the test results. NET support the number of online connections that is no pressure, a single connection every 10 seconds to interact with a message and some new connection access, if no message interaction estimated CPU resources can not see a percentage.
Concurrent understanding
In the communication process found that the understanding of concurrency is somewhat different, some students are concurrent refers to the number of simultaneous online connection, but some students understand the current service at the same time the amount of messages processed (seconds). In fact, the difference between the two is still very large. A simple example now you have 10 customers, they come to talk to you on the same day of business tired, not about a time to talk about a tired? Although the overall workload is the same, the former is likely to cause a resource crash that will not continue to work .... The same is true in service processing, as long as the number of connections does not produce data interaction and logic processing only in the memory of the pit is not affecting the CPU resources. So the best time to evaluate a service is to start with the actual business, this hardware feasibility is well evaluated if the customer requires 10W online and each customer has 10 seconds to generate an interaction; but if the business is for each customer to interact with a large amount of business data per second, it is more difficult to plan from hardware resources and bandwidth. You may need to do some feasibility tests to evaluate it.