A common desired scenario is to connect multiple peers to a single instance of a server. #152 added support for just this! 🎉

Configuring multi-peer

For configurable multi-peer to work properly, the signaling server implementation must support webrtc-signal-http-capacity.

By default, Multi-peer is enabled in our samples with support for an unlimited number of clients. However, this is likely not desired for a production scenario. To limit the number of peers that can connect to a server we must modify our configuration value, namely systemCapacity from serverConfig.json.

For example, to limit the server to accepting only 2 peer connections, we’d set the following value:

"systemCapacity": 2

By default, this value is set as follows:

"systemCapacity": -1

Which disables having any max capacity - In other words, by default an infinite number of peers is allowed.


Here are some of the caveats to keep in mind when leveraging multi-peer features: