How many WCF connections can be processed by one host?

I will try to explain this with an example. I am writing a chat application. There are users who can join chat rooms. The user must be logged in before he can join any room.

There is currently one service. The user uses this service. The user then sends and receives messages for all connected numbers through this single service.

channel.Login("Hans Moleman", "password");
channel.JoinRoom("name of room");
channel.SendChat("name of room", "hello");

I am thinking of a design change, so there is a new WCF connection for each joined room. In the actual application, the number of connections is likely to be in the range of 10-100, possibly more.

Is that a good idea? Or is it too 100 connections per client? The server should be able to handle many clients (range 100-1000, later up to 10 thousand). In case that matters, I use NetTcpBinding.

+3
source share
2 answers

From a practical point of view, WCF will allow you to have as many connections as you want. You can set the maximum number using service behavior. I believe there is a limit, but it is VERY high (higher than you probably want or need on the same server)

In addition to the WCF problem, there are other things to consider:

When you do this, you also need to take into account how you intend to use your service and handle concurrency, if necessary.

. , , 100 , ? ?

, WCF , .

+3

, " ", , . , , . , , , , .

, , : ? , , . .

, 100 .

, /, , .

+1

Source: https://habr.com/ru/post/1737817/


All Articles