Reputation: 1502
No one answers me correctly or with an official resource to this matter. I have a server and many modules. Each module will create a named pipe and the server will create one named pipe per module. I need to know how many named pipes can I have at the same time.
I'm not planning on connecting them like 10 clients to 1 server, no. I want to connect 1 client to 1 server always, but how many of this pipes can I make?
Note that I'm using WCF in C#.
Upvotes: 2
Views: 5627
Reputation: 12135
Each named pipe created in Windows uses some system resources, which means there is a practical limit on the number of pipes which can be created. See:
Every time a named pipe is created, the system creates the inbound and/or outbound buffers using nonpaged pool, which is the physical memory used by the kernel. The number of pipe instances (as well as objects such as threads and processes) that you can create is limited by the available nonpaged pool.
The exact numerical limit will depend on your system, but it is likely to be at least in the order of hundreds if not thousands.
When the pipes are being created using the WCF Named Pipe Binding, you can only create one pipe per base address, due to the way in which this binding publishes metadata about the pipe being used. It is therefore best to define WCF endpoints using absolute URI addresses rather than base address + relative. Provided you do this, and design a reasonable scheme for creating a unique absolute address for each endpoint, there is no fixed limit that I know of to the number of WCF endpoints you can create.
The actual practical limit on any particular system can only be discovered empirically. If your goal is to have a few tens of endpoints, I would guess that you will be able to achieve this comfortably. If you want to have thousands operating concurrently you may bring the practical limit of system resources into play. Only testing will determine this for sure.
Upvotes: 4
Reputation: 5987
First I wanted to tell you that you should explain the Question properly, otherwise no one will help you here. Explain where is the problem you faced and show us some code also.
From your explanation, i found that what you want is this : Number of Clients that can connect to a Named Pipe.
Upvotes: 0