Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: What is the best to handle thousands of clients |
claudeno From: Canada Posts: 3 Member Since: 09/17/14 |
posted September 17, 2014 10:50 AM Hi, here is the scope: I need to create a server that can handle thousands of clients. The client connects to the server, sends some data then closes the connection. However, some of the data sent by the client may need to be distributed to ALL clients. In order to accomplish that, the client state is stored in a database so the server knows to which clients it should send the data. The server connects to each client (the clients are listening on a separate TCP port number), send the data then close the connection. As you imagine, this may take lot of time to execute. So what is the best way to handle this task? I can't use UDP to multicast the data. |
claudeno From: Canada Posts: 3 Member Since: 09/17/14 |
posted December 13, 2014 10:03 AM We don't want to close the connection anymore. Here is the topo. Let say I have 3,000 clients connecting to the server and each connection must remain alive. A cient sends a command to the server and the following may happen: 1- A client sends a command to the server and the server sends a result to the client (simple) 2- A client sends a command to the server and the server should send a command to one or more specific clients (use a dictionary collection?) 3- A client sends a command to the server and the server should send a command to every 3,000 clients, including the sender) (speed required - this is why we want to keep the connections alive) How should I design the server to properly handle these tasks? Not sure IO Completion thread for each connection is the way to go with so many connections. Can a single server be able to send a message to 3,000 clients in a timely manner (let say 1 minute) or should I use several servers on different port numbers with a communication mechanism between these servers? If so, will the network card be the bottleneck? Thanks. |
Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |