The main challenge for p2p applications in unstructured networks (such as file-sharing networks, distributed file systems and distributed search engines) is how to perform data replication. Without data replication, the performance of the network depends solely on the availability of items (which in turn depends on the availability of peers). With data replication, it is possible to make copies of items and distribute them across the unstructured network, in order to improve the availability of items, increasing the performance of the network. Obviously, generating replicas of all items would be not only inefficient but also not feasible, since in real data networks, the number of items in the network is much larger than the number of peers connected, posing storage difficulties. An optimal replication
algorithm generates the right amount of replicas of the right items. P2R2 is an efficient, compact and near-optimal data replication algorithm.