Although WebRTC is a very fast and cheap technology, opening too many connections causes problems with the scalability and performance of the application. Decentralized applications often use the Mesh topology, so the use of WebRTC is a tough choice for a project that might have a lot of users. Therefore, nodes have to meet some conditions before they are connected to each other.
A small example to explain:
If you type "foxql" in the search box and search, the query packet is sent to the signal server first. The signal server broadcasts this to all users. Then all users search for the term "foxql" in their databases during the predetermined timeout. Webrtc connection is initiated with users who successfully respond within the given time. In this way, a connection with a certain number of users is always initiated no matter how many users there are.
https://github.com/foxql