One thread per client. Doable?

后端 未结 10 1751
走了就别回头了
走了就别回头了 2020-12-15 18:43

I\'m writing a Java server which uses plain sockets to accept connections from clients. I\'m using the fairly simple model where each connection has its own thread reading f

10条回答
  •  隐瞒了意图╮
    2020-12-15 19:20

    I'd suggest it depends more on exactly what else the server is doing when it processes the messages. If it's relatively lightweight then your machines spec should EASILY cope with merely handling the connections of thousands of such processes. Tens of thousands is another question perhaps, but you only need two machines on the same network to actually empirically test it and get a definite answer.

提交回复
热议问题