C# Networking: Handling Clients?
-
Ill try keep it short, Usually when I write networking applications, I spawn a new thread every time a client connects to the server. This works fine for my small time applications, but how do people who deploy large scale servers handle client communications? If you have thousands of users, for example a simple busy irc server, surely you cant spawn threads for all the users, what other methods are there? Andy
-
Ill try keep it short, Usually when I write networking applications, I spawn a new thread every time a client connects to the server. This works fine for my small time applications, but how do people who deploy large scale servers handle client communications? If you have thousands of users, for example a simple busy irc server, surely you cant spawn threads for all the users, what other methods are there? Andy
If I remember correctly IRC uses UDP, so there's only a few inbound connections, and a big list that it broadcasts out to with all the clients. Usually with an upstream server in that list so the other server can handle it's list of clients as well. I do know several online games use something similar to handle their loads. Login servers redirect each connection to a different communication server, the communication servers have a private link between them to relay data, while each one broadcasts data out to it's list of clients. Leaving just a few connections from the comm servers going back to the application servers.
The true man wants two things: danger and play. For that reason he wants woman, as the most dangerous plaything.