Chapter 5. Optimizing the replica topology