This is a simple simulation of peer connections in a bittorrent swarm, illustrating the potential performance issues (peer clustering) of widely used first-come-first-serve logic for accepting incoming connections as well as a solution to that problem. -
View it on GitHub