Number of active connections

When the number of active devices is small there won’t be many connections (for simplicity I’m assuming all connections are direct and do not require relays). If there are 2 devices only 1 connection between them is needed to synchronize all data. However, if there are 3 devices, that means that 3 connections are needed (if the 3 devices are A,B,C then the 3 connections are A<->B, B<->C, C<->A), then if there are 4 devices 6 connections are needed. To my understanding the number of connections required if all devices connect to all other devices follows this formula (where n is the number of devices) (n-1)*n/2. This means that if we have a network of 100 devices all connected to eachother we’d have a total of 4950 connections (or around 49.5 connections for each device). What I was wondering is, is there anything Syncthing does to reduce the amount of connections needed for each device? Does it limit the number of connections a device can make to other devices, and then ensures that all devices are eventually connected (which means that sometimes there can be more than one edge ‘separating’ two devices)? I’d appreciate it if you could let me know.

You don’t need a full mesh structure where every device connects to every other. That is the extreme case, the other extreme being a star topology where every device connects to one central hub only. Or you can choose anything in between. It just depends on how you set up the folder sharing options.

If you have more available and configured devices than you want active connections, there are the connectionLimitEnough and connectionLimitMax options.