简体   繁体   中英

How many connections on a Single Port

I've developed an application for Tracking vehicles via GPS. So, all vehicles which have the GPS module fit, will send data to my server.

My Windows Server 2008 R2 has port 9900 assigned for incoming data.

If I have say 1000 vehicles in future, which all send data(via TCP) may be at same time to server(all connecting on the same port).

Then will single port work?

Also, if some one can refer me to a free test tools by which I can simulate the GPS traffic.

Please look this topic, i think it will help.

From another side, connection management in practice depends on how your client\\server application is done:

  1. "notification" - client just send data to server (less then 1Kb)
  2. "short session" - client connects to the server and do some data exchange
  3. "long session" - client connects to the server and do permanent data exchange

So in the first case, you can just open the port listen connections, and close connection when data recieved.

In the third case connection procedure should be complex:

  1. server has few listen ports - one for connection management, others for data exchange
  2. client connects to the default port (connection management)
  3. server selects data exchange port that has less number of connections, and says to client to connect to this port for data exchange
  4. client disconnects from connection management port and connects to allocated data exchange port

In the second case you should decide what scenario should you use (depends on number of clients, and length of data sessions).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM