- Jun 7, 2018
- 1
- 0
- 1
I'm currently migrating a program I already have which is currently using a TCP base architecture but the server currently needs to send more packets per minute than before. The packet loss is not a problem, only the order which is solved by using a message buffer.
What I have so far:
Should the server have only 1 socket? If so, does this mean that every client will be sending their information through that socket? It seems there will be a huge bottleneck as every info will pass over this one hole.In order to solve the latter, do I need to use 1 port for each client in the server side? If so, do I need to have 1 central port for the first "connection" between client and server and then proceed to redirect the client to its specific port, thus having multiple ports, as many as clients?
I've never implemented such protocol, so I might be missing something, and there's very few info on such complex matter.
If there are any other things I should have in consideration, I appreciate any suggestions
Regards
What I have so far:
- A Client/Server Application, where each module keeps sending data packets back and forth
- The server can have up to 10 clientsEach client sends 50 p/s
- The server sends 50 packages per second times the number of clients
- Each packet can have up to 10k bytes
- The server is thread based, so non blocking.
- The clients never communicate between each other, only by server mediation.
Should the server have only 1 socket? If so, does this mean that every client will be sending their information through that socket? It seems there will be a huge bottleneck as every info will pass over this one hole.In order to solve the latter, do I need to use 1 port for each client in the server side? If so, do I need to have 1 central port for the first "connection" between client and server and then proceed to redirect the client to its specific port, thus having multiple ports, as many as clients?
I've never implemented such protocol, so I might be missing something, and there's very few info on such complex matter.
If there are any other things I should have in consideration, I appreciate any suggestions
Regards