Cloud-federations have emerged as popular platforms for Internet-scale services. Cloud-federations are running over multiple datacenters, because a cloud-federation is an aggregate of cloud services each of which runs in a single datacenter. In such inter-datacenter environments, distributed key-value stores (DKVSs) are attractive databases in terms of scalability. However, inter-datacenter communications degrade the performance of these DKVSs because of their large latency and narrow bandwidth. In this paper, we demonstrate how to reduce and hide the weak points of inter-datacenter communications for DKVSs. To solve the problems we introduce two techniques called multi-layered DHT (ML-DHT) and local-first data rebuilding (LDR). ML-DHT provides a global and consistent index of key-value pairs with the efficient expandability of the storage capacity. It employs a routing protocol which reduces routing hops that pass through interdatacenter connections. LDR reduces data transfer on interdatacenter connections by using erasure coding techniques. It enables KVS administrators to flexibly make trade-offs between expandability of storage capacity and the performance of data transfer. Experimental results demonstrate that our techniques improve the latency up to 74 % compared with a Chord-based system and enable us to balance the amount of storage usage and remote data transfer.