0140-3664/$ see front matter 2012 Elsevier B.V. A doi:10.1016/j.comcom.2012.01.002 ⇑ Corresponding author. Tel.: +39 3397211734. E-mail addresses: firstname.lastname@example.org (R.G @iet.unipi.it (S. Giordano), email@example.com ( neclab.eu (S. Niccolini), firstname.lastname@example.org (J. Seed The research community and Internet Service Providers (ISPs) are interested in designing locality-aware P2P applications, which balance the trade-off between localizing traffic and satisfying the quality of service requirements of the application. To this aim, taking into account the architecture considered by the Application Layer Traffic Optimization (ALTO) IETF Working Group, the paper proposes a study on the control of the P2P topology in a single operator intra-domain scenario, based on the K-Minimum Spanning Tree (K-MST) algorithm. In particular, the paper contribution can be summarized as follows: (i) the definition of a lower and an upper bound of the locality parameter of a P2P topology, (ii) the proposal of a heuristic, denoted as K-Better-Neighbors (KBN), for controlling the P2P topology in presence of peer churning, (iii) the discussion of different solutions based on periodic topology optimization to manage the P2P system in presence of peer churning, and (iv) the comparison of the system performance obtained by the proposed solutions and some reference strategies in a dynamic scenario, from both the ISP and user perspective. 2012 Elsevier B.V. All rights reserved.