1
Totoro+: An Adaptive and Scalable Edge Federated Learning System Abstract—Federated Learning (FL) is an emerging distributed machine learning (ML) technique that enables in-situ model training and inference on decentralized edge devices. We propose Totoro+ , a novel scalable FL system that enables massive FL applications to run simultaneously on edge networks. The key insight is to explore a distributed hash table (DHT)-based peer-topeer (P2P) model to re-architect the centralized FL system design into a fully decentralized one. In contrast to previous studies where many FL applications shared one centralized parameter server, Totoro+ assigns a dedicated parameter server to each application. Any edge node can act as any application’s coordinator, aggregator, client selector, worker (participant device), or any combination of the above, thereby radically improving scalability and adaptivity. Totoro+ introduces three innovations to realize its design: a locality-aware P2P multi-ring structure, a publish/subscribe-based forest abstraction, and a game-theoretic path planning model with a guarantee of an ϵ-approximate Nash equilibrium. Real-world experiments on 500 Amazon EC2 servers show that Totoro+ scales gracefully with the number of FL applications and N edge nodes speeds up the total training time by 1.2×−14.0×, achieves O(log N ) hops for model dissemination and gradient aggregation with millions of nodes, and efficiently adapts to the practical edge networks and churns. Index Terms—Distributed and parallel systems for machine learning, federated learning, game theory, and edge computing.
I. I NTRODUCTION ITH the rise of 5G and the growth of connected devices, federated learning (FL) enables local data processing and machine learning at the network edge. This approach reduces data transmission and enhances privacy by eliminating the need for centralized servers. FL has been applied in various domains, including human activity prediction [2], [3], sentiment analysis [4], language processing [5], [6], and enterprise systems [7]. The problem. We consider a typical edge computing architecture where millions of edge devices (e.g., smart wearables,
W
This work was supported in part by the National Science Foundation under Grants NSF-OAC-2313738, NSF-CAREER-2313737, and NSF-CNS2322919, and in part by the National Science and Technology Council under Grants 113-2221-E-194-040-MY3, and 114-2628-E-194-002-MY3. A preliminary version of this paper appeared at the Proceedings of the Nineteenth European Conference on Computer Systems (EuroSys’24) [1]. (Corresponding author: Liting Hu.) Cheng-Wei Ching and Liting Hu are with the Department of Computer Science and Engineering, University of California, Santa Cruz, Santa Cruz, CA 95064 USA (e-mail: [email protected]; [email protected]). Xin Chen is with the Department of Computer Science and Engineering, Georgia Institute of Technology, Atlanta, GA 30332 USA (e-mail: [email protected]). Taehwan Kim is with the Department of Computer Science, Virginia Tech, Blacksburg, VA, 24061 (e-mail: [email protected]). Jian-Jhih Kuo is with the Department of Computer Science and Information Engineering, National Chung Cheng University, Minhsiung, Taiwan (e-mail: [email protected]). Dilma Da Silva is with Texas A&M University, College Station, TX 77843 USA (e-mail: [email protected]).
App#1: Driver behavior prediction App#2: Traffic pattern analysis App#3: Vehicle anomaly detection ...
arXiv:2605.26323v1 [cs.DC] 25 May 2026
Cheng-Wei Ching , Xin Chen , Taehwan Kim , Jian-Jhih Kuo , Dilma Da Silva , and Liting Hu
V2V
Upload local model
V2I
V2I
Parameter server
V2X
Download global model
Edge Cloud
Fig. 1: An edge federated learning use case based on autonomous vehicles. autonomous vehicle sensors) connect to the cloud through an edge layer. This layer comprises hundreds of thousands of server-grade machines, gateways, and routers—termed “edge nodes”, managed by various providers across geographically distributed sites. Raw data is collected and stored on these edge nodes, enabling machine learning models to be trained locally without transferring raw data to a central server. Federated learning (FL) tools and frameworks—such as TensorFlow Federated [8], LEAF [9], FLOAT [10], REFL [11], and PySyft [12]—have gained traction. However, building an efficient FL system on practical edge networks remains challenging due to dynamic edge environments and the high scalability demands of emerging FL applications. Figure 1 illustrates a use-case scenario that highlights these challenges. In future intelligent transportation systems such as the efforts currently funded by the US Department of Transportation [13], autonomous vehicles are interconnected and equipped with wide-area network access They continuously collect sensor and behavioral data such as speed, engine performance, driving patterns, and environmental conditions. On the back end, numerous FL applications will run concurrently on these vehicles or edge nodes, performing insitu training using the collected data. Examples of such FL applications include driver behavior prediction, which trains Long-Short Term Memory (LSTM) networks [14] to anticipate lane change actions [15]; traffic pattern analysis, which learns traffic patterns to redirect optimal routes [16]; and anomaly detection, which employs federated learning to identify and respond to vehicle malfunctions or hazardous road conditions in real time [17]. Our solution: Totoro+ . We present Totoro+ , an adaptive and scalable federated learning (FL) system designed to support large-scale concurrently running FL applications on edge networks and adapt to edge dynamics. Rather than modifying existing FL systems, we adopt a fully decentralized architecture. Unlike prior approaches where multiple FL applications
2
rely on shared centralized parameter servers, Totoro+ assigns each application its own parameter server, preventing overload on any single edge node. Moreover, any edge node can dynamically serve as an application’s coordinator, aggregator, client selector, worker, or any combination of these roles, significantly enhancing scalability and adaptivity. The key idea is to leverage a distributed hash table (DHT)based peer-to-peer (P2P) architecture to redesign FL systems. P2P models, widely used in file sharing (e.g., BitTorrent [18], Storj [19], Freenet [20]), peer-assisted CDNs [21], and blockchains [22], treat all nodes equally, without a central server, as they collaborate to perform tasks or deliver services. For instance, in BitTorrent [18], users both download and upload file pieces to/from peers. Inspired by this model, we enable all edge nodes to jointly handle FL training and testing for a large number of applications in parallel. Totoro+ introduces three innovations to realize its fully decentralized design: a locality-aware P2P multi-ring structure, a publish/subscribe-based forest abstraction, and a gametheoretic path planning model. First, edge nodes self-organize into a scalable DHT-based P2P overlay. The locality-aware P2P multi-ring structure enforces administrative boundaries between edge sites, enabling efficient local FL execution and preserving site-specific control flows. Second, Totoro+ builds a publish/subscribe-based forest abstraction on top of the locality-aware P2P multi-ring structure for model broadcasting and gradient aggregation. This decouples the centralized FL architecture into a “fully” decentralized architecture, where each FL application operates on an independent dataflow tree, significantly enhancing system scalability. Besides individual dataflow trees for FL applications, we introduce an advertise-discover (AD) tree that enables edge nodes to publish and locate FL applications within the overlay. Third, to address edge dynamics (e.g., link failures, stragglers, and bandwidth constraints over edge networks) Totoro+ employs a game-theoretic path planning model that dynamically replans data transfer paths, ensuring robust and adaptive model broadcast and gradient aggregation. Summary of results. We implement Totoro+ using the open-source Pastry DHT [23] and PyTorch [24] frameworks, 1 and evaluate it on various FL tasks with real-world datasets across 500 Amazon EC2 servers. Compared to state-of-theart FL systems [25], [26], Totoro+ achieves superior scalability and load balancing, efficiently distributing masters across large-scale edge networks without overloading individual nodes. It accelerates total training time by 1.2× to 14.0×, supports O(log N ) hops for model dissemination and gradient aggregation at million-node scales, and robustly handles network churn and unreliable edge conditions. Contributions. This paper makes the following contributions : Problem: We analyze the software architecture of current FL systems and identify key challenges in applying FL to practical edge networks. + • Key idea: Totoro explores the DHT-based P2P model to propose a novel, fully decentralized “many masters/many •
1 https://github.com/UCSC-ELVES-Lab/Totoro-EuroSys-2024
Features
Totoro [1]
Totoro+ (this work)
Application advertisement and discovery Path planning model
Join-by-AppId
Advertise-discover tree
Algorithmic complexity Theoretical guarantee
Bandit model without traffic congestion O(log N · IKL ) Heuristic
Failure recovery
Worker
Game-theoretic model with traffic congestion O(log N · M atmul) ϵ-approximate Nash equilibrium Worker and master
TABLE I: Comparison between Totoro and Totoro+ , where IKL is the iteration complexity of solving the Kullback–Leibler divergence-based convex feasibility, and M atmul is matrix multiplication. workers” architecture that significantly enhances scalability and adaptability. + • Totoro design & implementation: Totoro+ incorporates three key innovations: a locality-aware P2P multi-ring structure, a publish/subscribe-based forest abstraction, and a game-theoretic path planning model with theoretical guarantees of an ϵ-approximate Nash equilibrium. + • Results: Our evaluation demonstrates Totoro ’s substantial improvements in scalability and adaptability over state-ofthe-art FL systems. A preliminary conference paper version [1] has been published in Proceedings of the Nineteenth European Conference on Computer Systems (EuroSys’24). The summary of changes is presented in Table I. In this journal version, we provide the following three significant improvements: First, we introduce the advertise-discover (AD) tree to the publish/subscribe-based forest abstraction. The AD tree enables edge nodes to advertise and discover FL applications running over the DHT-based P2P overlay for FL application searching and crowdsourcing [27], [28] (see Appendix A for a detailed comparison with the conference version). Secondly, we replace the bandit-based path planning model with the game-theoretic path planning model, which formalizes the path planning problem as a congestion game with bandit feedback and introduces a game-theoretic distributed hop-by-hop algorithm with the guarantee of an ϵ-approximate Nash equilibrium (see Appendix B for a detailed comparison with the conference version). Thirdly, we provide respective failure recovery mechanisms for master and worker node failures. When a worker node fails, its child node sends a JOIN message using AppId as the key to find a new parent node to recover the dataflow tree. The master node in each communication round replicates the training state across k nodes in its neighborhood set. When the master node fails, its immediate node sends a JOIN message using AppId as the key to find an alternative master node. The new master node retrieves a state replica to proceed with the training process. Finally, we demonstrate that the game-theoretic path planning model is a better solution for adapting to edge dynamics with experiments on packet latency, and Nash regret. Also, we provide more extensive experiment results to demonstrate further Totoro+ ’s scalability to massive FL applications, fault tolerance to simultaneous node failures, and adaptivity to edge dynamics.
Parameter server(s)
User queries FL model N
FL model 2
Federated learning applications
FL model 1
II. BACKGROUND We start with a quick primer on the software architecture used in state-of-the-art federated learning (FL) frameworks. State-of-the-art FL frameworks (e.g., Meta’s PAPAYA [29], LinkedIn’s FLINT [30], Google’s federated learning framework [31], IBM Federated Learning framework [7], and Apple’s federated task processing system [32]) commonly adopt a centralized or hierarchical “single master/many workers” architecture. In this architecture, the master is typically deployed on a parameter server, acting as a coordinating service provider without data. The workers, on the other hand, connect to numerous edge devices and serve as both the data owners and beneficiaries of federated learning. Figure 2 illustrates the data pipeline between these components in a typical FL framework. The high-level design involves two parts: the parameter server that runs the “master”, and the end-user devices that run the “workers”. The parameter server comprises three main components: Coordinator, Selector, and Aggregator. While the number of Selectors and Aggregators can scale elastically based on the workload demand, there is only one Coordinator. We summarize the functions of these components as follows. Coordinator. The Coordinator performs three main functions: • Task Assignment. Whenever a new FL application is submitted to the system, the Coordinator assigns the application to a single Aggregator based on the workload among Aggregators and the estimated workload of the application such as application concurrency and model size. • Client Assignment. For each available client, the Coordinator constructs a list of eligible applications. The Coordinator assigns each client to an application. • Task Migration. The Coordinator moves applications between Aggregators when it detects failed or overloaded Aggregators. Aggregator. The Aggregators are persistent and stateful to avoid a substantial cold start overhead for a new application. Each Aggregator is responsible for one single FL application and carries out three main responsibilities. • Gradient Aggregation. Once a client completes training, it uploads the trained serialized gradient update to the server. This update is then pushed into an in-memory queue on the Aggregator, which aggregates client gradient updates to produce new versions of the server model of an application. • Client Guidance. The Aggregator guides clients into running the client protocol, such as downloading, uploading, and training configurations, by responding clients requests from the Selector. • Client Tracking. The Aggregator is responsible for tracking (i) if clients are satisfied with their assigned applications, and (ii) if clients are still eligible for their assigned applications. The tracking information will be used by the Coordinator to run client assignments. Selector. The Selector is the only component that directly communicates with clients and plays two roles: • Task Advertisement. The clients check in with the Selector and report their eligibility for available applications. The Selector summarizes client availability for the Coordinator.
FL model 3
3
…… Coordinator coordinates
coordinates
creates
Master aggregator creates
creates
Aggregator … Aggregator Selector … Selector Model broadcast & Gradient aggregation
Edge physical networks
Fig. 2: The data pipeline in a typical FL framework. •
Request Forwarding. When a client is assigned an eligible application. The Selector forwards the client to the Aggregator responsible for that application. The Selector also routes clients’ requests to the corresponding Aggregator, such as model broadcasting, and reporting client status and gradient updates. III. C HALLENGES
We highlight the challenges that we face when applying FL to real-world edge networks in this section. Challenge #1: Scaling gracefully with the number of diverse FL applications and edge nodes. As emerging edge applications and edge devices grow in quantity and complexity, the number of FL applications submitted to the edge will likely become huge. As shown in Figure 1, different FL applications may require training of various FL models for different driver profiles (e.g., speeds, distances, passengers), vehicle conditions, and environmental factors (e.g., intersections, pedestrians, moving objects) simultaneously based on the same raw data. This results in the generation of a vast number of FL tasks. Therefore, key considerations in addressing this challenge include: Distributed task management. As shown in Figure 2, existing production FL systems typically rely on a single instance of Coordinator to direct Aggregators and Selectors across all FL training and testing tasks. While this hierarchical design scales well in datacenter environments, it struggles in edge systems with millions of nodes and many concurrent FL applications. The challenge is amplified by the presence of multiple edge providers [33], each managing its own set of edge nodes, resulting in no global view of workloads and resources. Without this global view, existing FL systems cannot balance FL tasks effectively across the edge, hindering
4
Totoro+ API (Section IV-E)
Layer-3
their ability to scale with new nodes and applications and increasing overall training time. Besides longer training time, existing FL systems may fail to advertise the existing/new FL tasks to new/existing clients to further strengthen model accuracy without a global view of running applications. Application-specific customization. As FL applications diversify with emerging use cases, flexible designs for participant selection [34]–[36], compression [37], [38], and communication protocols—synchronous [39], semi-synchronous [40], or asynchronous [41]—are increasingly needed. However, existing FL systems typically share a single parameter server across applications and enforce fixed FL policies, limiting their ability to support diverse requirements. Achieving applicationspecific customization often requires using multiple FL frameworks, which compromises efficiency, maintainability, and simplicity.
Subscribers (Section IV-C) aggregation
Publisher
Failure recovery (Section IV-D)
Layer-2
Replicate
Game-theoretic path planning model (Section V) High Bandwidth Nodes
JOIN
broadcast AD tree & Dataflow trees (Section IV-C) Root
App 1
App 2
App 3
Layer-1
Master
Multi-ring structure (Section IV-B)
Multi-ring
Node 103220 edge node
Routing table
m*O(logN) hops 031120
031120 0 100221
1 110003 101203 103112 103210
201303 120132 102303 2 2
312201 132012 3 103302
103302
103330
0
DHT-based overlay
120132 312201
Leaf set 103123
103210
Neighborhood set 031120
312201
120132
101203
Edge node 103220 in a 12-bit identifier space and a base of 4 (l=12, b=2)
Edge physical networks
Challenge #2: Adapt to practical edge network conditions such as varying bandwidths, unreliable links, high churn, and workload surges. The second challenge arises from the first one. To scale with massive FL applications, cloud administrators usually partition all nodes into many sets and assign a parameter server per each set of nodes in a static manner (e.g., one parameter server per rack) [10], [11], [26]. While this assignment approach may work well in datacenters, it lacks the agility to adapt quickly to edge platforms that have millions of resource-constrained nodes. Edge environments are characterized by the following unique difficulties: (1) edge network link delays are unpredictable and vary stochastically due to unreliable links and random access protocols (e.g., in wireless networks [40], [42]), client mobility (e.g., in mobile ad-hoc networks [27], [43]), and randomness of demand (e.g., workload surges [44], [45]) in arbitrary (and dynamic) geographical edge locations, and (2) edge nodes fail or lag unexpectedly (e.g., due to signal attenuation, interference, and wireless channel contention [40], [42]). However, unlike datacenter servers, edge nodes have limited computing resources (few-core processors, little memory, and little permanent storage [44]) and no backpressure [46]. As such, there is little room to adapt to the edge dynamics or handle stragglers by over-provisioning resources or replicating links like previous studies. Moreover, edge nodes may belong to different owners who do not share operation or application information and have to compete for communication resources over edge networks [47], [48]. Therefore, efforts should be made to replan the data transfer paths dynamically and autonomously to adapt to the edge dynamics and constrained network bandwidth. IV. T OTORO+ DESIGN +
Totoro proposes a novel scalable FL system for practical edge networks. To achieve this, Totoro+ incorporates several key techniques and components, which we describe in detail. A. Overview Totoro+ ’s system goals are:
Fig. 3: The Totoro+ system overview. Scalability. Totoro+ can scale to process a vast number of FL applications’ tasks simultaneously on millions of edge nodes without introducing any centralized bottleneck. + • Adaptivity. Totoro can quickly adapt to the practical edge networks characterized by varying bandwidths, unreliable links, high churn (nodes join and leave), and workload surges in arbitrary geographical edge locations. • Good FL performance. When handling a vast number of FL applications, Totoro+ can speed up the training process for each of them. As shown in Figure 3, Totoro+ has three layers: a localityaware P2P multi-ring structure, a publish/subscribe-based forest abstraction, and a high-level API. Layer 1: locality-aware P2P multi-ring structure. All distributed edge nodes are self-organized into a DHT-based P2P overlay. Each node has a unique 128-bit NodeId in a very large circular NodeId space. In an edge network with N nodes, the DHT-based P2P overlay guarantees that, no matter where the source node is, any FL data (e.g., model or gradient) can be routed to any destination node within O(log N ) hops. Compared to existing DHTs studies [49]–[51], our innovations are: (1) Totoro+ divides the original single P2P ring structure into many smaller, more manageable locality-aware P2P multiring structures that enable locality-aware FL processing; and (2) Totoro+ designs a new boundary-aware two-level routing table that ensures administrative isolation for privacy concerns. Layer 2: publish/subscribe-based forest abstraction. Built upon Layer 1’s locality-ware P2P multi-ring structure, Totoro+ introduces a new publish/subscribe-based forest abstraction that manages a vast number of FL applications in a scalable manner. Each FL application is assigned a dynamically structured dataflow tree that operates with maximum independence and is responsible for disseminating the model from the master to the workers and aggregating the gradients from the workers to the master. In addition to dataflow trees, the masters of all dataflow trees construct an advertise-discover (AD) tree to advertise and discover FL applications running over the overlay. These trees together form a “forest”. Our •
5
innovations are (1) a fully decentralized architecture—unlike other federated learning systems, our system does not have a static assignment of parameter servers. Instead, any edge node can be automatically promoted as a parameter server (master) when workload surges, which significantly improves load balancing and scalability. (2) Advertising and discovering FL applications—new edge nodes that just joined the overlay can easily locate and subscribe the FL applications running over the overlay. (3) DHT-based routing—the time complexity of model/AppId broadcast, and gradient/AppId aggregation is limited to O(log N ) hops. Layer 3: high-level API. We provide a high-level API to abstract away the complexities of P2P overlay construction, dynamic-structured dataflow tree construction, model/AppId dissemination, and gradient/AppId aggregation. Totoro+ supports application-specific customization, allowing application owners to set their own FL policies. B. Layer 1: locality-aware P2P multi-ring structure Many times, geographic diversity or location matters for training FL applications. For example, a road traffic detection application may require nodes with varying weather condition information in different geographic locations [15]–[17]. Training a model on a medical disease prevalent in a certain region may require information from a specific location [52], [53]. Therefore, we organize distributed edge nodes into a locality-aware P2P multi-ring structure to enable localityaware FL processing. First, we organize distributed edge nodes into a DHT-based P2P ring overlay, which is similar to the BitTorrent nodes that use the Kademila DHT [54] for “trackerless” torrents. Each edge node is assigned a unique 128-bit NodeId in a very large circular NodeId space (e.g., 0 ∼ 2128 ). NodeIds are used to identify edge nodes and route FL data (e.g., model or gradient) over large-scale edge networks. To do that, each node needs to maintain three data structures: a routing table, a leaf set, and a neighborhood set. • Routing table is used for routing FL data. It consists of node characteristics organized in rows by the length of the common prefix. The routing works based on prefix-based matching. Every node knows m other nodes in the ring and the distance of the nodes it knows increases exponentially. The routing jumps closer and closer to the destination, like a greedy algorithm, within ⌈log2b N −1⌉ hops, where 2b −1 is the routing table’s entry size. • Leaf set is used for rebuilding the routing tables upon failures. • Neighborhood set contains a fixed number of nodes that are “physically” closest to that node for maintaining the locality properties. Second, we divide the original large P2P ring into m smaller, more manageable, locality-aware rings, which we call “multi-rings”, using Ratnasamy and Shenker’s distributed binning algorithm [55] (m is a configurable parameter). Each ring is an “edge zone” and is characterized by a maximum desired network round-trip time (RTT), called diameter. Third, we design a new routing table to enable administrative isolation. The challenge is, how to achieve path
convergence to enable administrative isolation, i.e., data paths from different nodes in an edge site should converge at a node in that edge site? Existing DHTs [49]–[51], [54] do not guarantee path convergence as those systems try to optimize the search path to reduce response latency. To route a packet to an arbitrary destination key, the packet will be routed to the destination node in another site as long as it has a longer NodeId prefix matching the key. To address this challenge, we make the following changes to existing routing tables: (1) each NodeId now has (m + n)-bit, where the m-bit prefix presents the zone Id and the n-bit suffix represents the NodeId within a zone. Let P denote the prefix of NodeId, i.e., P1 ...Pn . Let S denote the suffix of NodeId, i.e., S1 ...Sn . Then the NodeId equals D = P ∗2n +S; correspondingly (2) each node’s routing table will have two levels: the level 1 routing table and the level 2 routing table. The ith entry in the level 1 routing table with m entries at peer x equals to (Px + 2i−1 )mod 2m ∗ 2n . The ith entry in the level 2 routing table with n entries at peer y equals to (Sy + 2i−1 )mod 2n . To achieve administration isolation, the administrator of an edge site can leverage the level 1 routing table to control the data flow among different edge zones. For example, when an FL application should be running only within an edge site, any packet generated by that FL application should only travel within this edge site. Administrators can check the destination of packets. If the packet’s destination shares a different prefix with the administrator’s zone Id, the administrator can block the packet before routing it outside the edge zone. C. Layer 2: publish/subscribe-based forest abstraction Built upon Layer 1, Totoro+ introduces a new publish/subscribe-based “forest” abstraction for managing a vast number of FL applications in a scalable manner. Specifically, our goal is to achieve a balanced distribution of masters for hundreds of thousands of FL applications, ensuring that they are not concentrated on a few overloaded nodes. The key innovation is leveraging DHTs to decompose the FL system architecture from 1:n to m:n, where each FL application can be assigned a dynamic-structured dataflow tree that operates with maximum independence, thereby radically improving load balance and scalability. A DHT is a hash table that partitions the key space and distributes the parts across a set of nodes, providing a lookup service similar to a hash table. The trick with DHTs is that the node that gets to store a particular key is found by hashing that key, so in effect, the hash-table buckets are now independent nodes in a network. We utilize the fully decentralized nature of DHT to process FL applications’ tasks at an extreme scale: unlike other FL systems, Totoro+ does not have a static assignment of a parameter server. Instead, the parameter server is broken down into many components, such as the coordinator, client selector, and aggregator. Any edge node can act as any FL application’s coordinator, aggregator, client selector, worker (participating edge device), or any combination of the above, thereby radically improving load balance and scalability. Figure 4 lays out the construction of the publish/subscribebased “forest”. It has the following steps.
6
Hash(“App1”)=77 N77 N78
Master N2
N69
Hash(“App2”)=2
N72
N55 N50
App1
App2
App3
Advertise-discover tree
Master
Master
Master
Root
N78
N2
N22
N11
Workers
N49
N15
N47
N17
N27
N72
N69
N21
AppIds
N29 N17
N10
N11 N15
N33
N38
N35
N33
N29
N21 N22
N22
Hash(“AD app”)=21 N47
N49
N50
N55
N18
N20
N38
N42
App3's tree Gradient aggregation
N35 AppIds
Hash(“App3”)=22
App1's tree App2's tree
N20 N27
Root node of advertise-discover tree
Model dissemination
Gradient aggregation
N18
Root N42
Master node Worker node
N10
N78
N2
Model dissemination AppIds dissemination & aggregation
Fig. 4: The workflow of Totoro+ ’s publish/subscribe-based “forest” abstraction with three dataflow trees for three FL applications and an advertise-discover tree for application advertise and discovery. Built on top of Layer 1, all edge nodes are structured into a DHT-based P2P overlay. Here we use one ring as an example. The DHT-based P2P overlay guarantees that: given a message and a key, no matter where the source node is, the message can be reliably routed to the node whose NodeId is numerically closest to that key, within ⌈log2b N − 1⌉ hops, where 2b − 1 is the routing table’s entry size. The first step is constructing application-based logical “trees” of nodes and ensuring that these trees are well balanced over the large-scale edge topologies (Figure 4 left). a. When any new FL application is launched, we calculate the application’s AppId, which equals the cryptographic hash of the application’s textual name, the creator’s public key, and a random salt, AppId=hash(“FL application”). The hash is computed using the collision resistant SHA-1 hash function, ensuring a uniform distribution of AppIds. b. Then, the edge node processing the application’s data routes a JOIN message using AppId as the key. Since all nodes belonging to the same application use the same key, their JOIN messages eventually arrive at a rendezvous node, with NodeId numerically close to AppId. The rendezvous node is set as the root of this application’s tree. c. The unions of all JOIN messages’ paths are registered to construct the tree, in which the internal node, as the forwarder, maintains a children table for the group containing an entry (IP address and AppId) for each child. All of the trees together form a “forest” abstraction. d. For each application’s tree, we designate the root node as the master, the internal nodes as the coordinator, aggregator, and client selector components, and the leaf nodes as the workers (participating edge devices). Rationale: (1) Since different applications have different AppIds, the paths and the rendezvous nodes of their spanning trees will also differ, resulting in an even distribution of trees across all edge nodes. (2) Because all nodes are equal, each node can serve as a leaf, internal, or root node for different applications, thus removing the scalability bottleneck without overburdening any single node. The second step is implementing a topic-based publish/ subscribe messaging protocol within the dataflow tree. Each FL application has a “topic”. The master is the “publisher”, and the workers are the “subscribers”. a. Model broadcast. The master disseminates the FL model to the workers along the tree. Then each worker inde-
pendently trains a local model and computes the model updates (e.g., gradients and weights) on the local data. b. Gradient aggregation. Once the workers have completed the computation, the master aggregates model updates from the workers, in which each level of the tree progressively aggregates the updates from tree leaves to the root. To meet the diverse needs of different applications, owners can specify different aggregation functions in their trees. For instance, FedAvg [39] works well in most situations, while FedProx [56] demonstrates superior performance in highly heterogeneous settings for more stable and accurate convergence. Rationale: (1) Due to the loosely coupled interaction between the publisher and subscribers, Totoro+ can simultaneously support a large number of dataflow trees with a wide range of tree sizes and a high rate of membership turnover. (2) The use of DHTs enables the efficient construction of aggregation trees and multicast services, as their converging properties guarantee model broadcast or gradient aggregation to be fulfilled within only O(log N ) hops, which places an upper bound on worstcase latency for data transfers. The third step is constructing an advertise-discover (AD) tree that enables edge nodes to advertise and discover FL applications running over the overlay (Figure 4 right). a. Similar to the first step, each master of various applications’ trees routes a JOIN message using AppId=hash(“AD application”) as the key. Since all masters use the same key, their JOIN messages eventually arrive at a rendezvous node whose NodeId is numerically closest to AppId. The rendezvous node becomes the root of the AD tree. b. The unions of all JOIN messages’ paths are registered to construct the AD tree. In addition to children tables for FL applications, the internal node in the tree works as a forwarder that maintains a children table consisting of the IP addresses of each child and AppIds of FL applications each child is hosting. c. The root of the AD tree is the “publisher”, and other nodes are the “subscribers”. The publisher disseminates AppIds of FL applications to each node along the tree, whereas the subscribers in different levels of the tree progressively aggregate AppIds of FL applications to the root. d. Whenever a new edge node that joins the DHT-based P2P overlay wants to discover FL applications running over
7
the overlay or an existing edge node intends to switch to a different FL application running on the overlay, it can route a JOIN message using the same AppId to join the AD tree as a subscriber and receive the AppIds of interest. After that, it can route a LEAVE message using the same AppId to leave the AD tree. Rationale: (1) Since edge nodes may join and leave the overlay frequently and suddenly, joining nodes can subscribe to the AD tree first and receive the information of current FL applications instead of sending broadcast messages to all other nodes, making Totoro+ adaptive to practical edge networks. (2) Because edge nodes can leave the AD tree immediately after they receive the necessary information, the tree may have M nodes plus some intermediate nodes N ′ most of the time and N ′ << N , where M denotes the number of current FL applications and N denotes the number of nodes in the overlay. Therefore, with the use of DHTs, the AppId broadcast and aggregation can also be fulfilled within O(log(M +N ′ )) hops. A comparison of Totoro and Totoro+ in terms of FL application discovery and advertisement is presented in Appendix A.
Join(IP, port, site) Edge node joins the DHT-based P2P overlay network. CreateTree(app id) Application owner creates a dynamic-structured dataflow tree and configures the parameters (e.g., fanout). Subscribe(app id) Edge node sends a JOIN message to subscribe to a dynamicallystructured dataflow tree with the topic equal to app id. Application owner can specify her client selection function in the API. Unsubscribe(app id) Edge node sends a LEAVE message to unsubscribe to a dynamically-structured dataflow tree with the topic equal to app id. Broadcast(app id, object) Application’s master disseminates the model or AppIds to workers along its dynamically-structured dataflow tree. Application owner can specify her compression function in the API. onBroadcast(app id, object) Callback. Invoked when the worker receives any model, updates, or AppIds from the application’s master. Aggregate(app id, object) Application’s master aggregates updates or AppIds from the workers to the root. Application owner can specify her aggregation function in the API. onAggregate(app id, object) Callback. Invoked when any internal node receives updates or AppIds from a child node. onTimer(app id) Callback. Invoked periodically. Application’s master uses it to get the information about the progress of training (e.g., round num, accuracy, straggler id) and inference.
TABLE II: Totoro+ API. E. Layer 3: high-level API D. Failure recovery In the case of node failures, we use a parallel recovery approach to repairing the dynamic-structured dataflow trees. A dataflow tree has a master and several workers, and the parallel recovery approach leverages two respective ways to deal with the failure of a worker and the failure of a worker. Worker node fails. Periodically, each internal node in the tree sends a keep-alive message to its child nodes. A child node suspects its parent fails when it cannot receive keepalive messages from its parent node. In such a scenario, the child node routes a JOIN message using AppId as the key. The overlay network will route the message to a new parent, create an alternative route, and repair the dataflow tree. Master node fails. In each training round, we replicate the state associated with each application’s master across the k nodes in its neighborhood set (k = 2, by default), which consists of a fixed number of nodes that are “physically” closest to the master node. If the master node fails, its immediate child node will detect it, route a JOIN message using AppId as the key, and identify a new master node to take over the role of the failed master. According to Layer 2: publish/subscribe-based forest abstraction, the new master node’s NodeId will be numerically closest to the AppId, and it will first contact the nodes that have state replicas to recover the state and inform workers to continue the training tasks like aggregation, global model update, and broadcast. The tree repair process scales well: failure detection is done by sending messages to child nodes only. Failure recovery is also local. Only a small number of nodes (O(log2b N )) is involved, in which 2b is the fanout of the tree. In addition, the replicas of states are typically transmitted over local networks with plentiful bandwidth; hence, the communication overhead is negligible.
We abstract key components of Totoro+ to provide an easy-to-use API (see Table II). Totoro+ supports applicationspecific customization, allowing application owners to set their own FL policies. The Pastry DHT and Scribe multicast infrastructure are written in Java, with end-user functionality encapsulated in a Python API. This is done so that users do not have to deal with two libraries in separate languages. Thus Totoro+ can be easily integrated with popular FL frameworks such as PyTorch [24], PySyft [12], and TensorFlow Federated [8]. Application-level customization. Totoro+ ’s APIs support application-level customization. For example, to prevent potential leakage of model weights to other nodes, application owners can specify various privacy techniques in Aggregate(app_id, object), such as differential privacy [57], secure aggregation [29], and homomorphic encryption [58]. Nodes that subscribe to an FL application adhere to the privacy technique specified by that application during the FL process. Take differential privacy as an example, if an application owner launches an FL application and specifies the use of differential privacy with Gaussian noise to secure weights, the edge nodes, as the master, coordinator, aggregator, and client selector, will operate following the privacy technique. Similarly, the leaf nodes, serving as workers, will apply Gaussian noise to local training. Moreover, to realize client selection techniques, application owners can rule out edge nodes that do not meet specific requirements (e.g., data distributions, battery, network conditions, etc.) when receiving JOIN messages from edge nodes. Multi-rings. Application owners can specify whether their applications span multiple zones. For example, a road traffic detection application may require nodes with different weather condition information in different geographical locations. If an application needs to ingest data sources across multiple zones,
8
it will traverse multiple zones (at most m) to build the dataflow tree, resulting in m × O(log N ) routing hops. V. G AME - THEORETIC PATH P LANNING M ODEL Totoro+ introduces a new game-theoretic path planning model that can replan the data transfer paths in dynamically structured dataflow trees to adapt to unreliable edge networks. In most real-world edge networks, link delays are unpredictable and vary stochastically [59]. When a link becomes slow, it can disrupt communication with its child and parent nodes, thereby affecting the entire path from the leaves to the root passing through this link in dataflow trees. The challenge is that, in many cases, we don’t know the quality of the network links in advance, such as the probability of successfully transmitting packets in wireless sensor networks [59]. This information is often obtained by actually sending packets and observing the outcomes. Furthermore, the network links have limited capacities [59]. When a link carries too much traffic, its overall data rate dramatically decreases. Therefore, we face two dilemmas when planning the paths for model dissemination and gradient aggregation. One is whether to explore new or unknown links or exploit well-known ones. If we only rely on the known links, we may miss out on finding a better one with a higher success rate or data rate. However, exploring too many new links may result in more packet losses and higher communication delays. The other is whether to prioritize link quality or link capacity. Maximizing link quality avoids packet loss and errors but may overload these paths, leading to congestion and increased latencies. However, prioritizing link capacity may increase the risk of transmission failures instead. This is where Multi-Armed Bandit (MAB) algorithms [60], [61] and game theory [48], [62], [63] come into play. Imagine someone at a bustling amusement park, surrounded by various facilities like roller coasters, merry-go-rounds, and Ferris wheels. Each facility differs in its entertainment type and its queue length. Initially, she explores different facilities randomly, collecting data on two key aspects: the joy each ride brings and the length of the waiting time. Her goal is to maximize her day by finding the facilities that offer the best balance of fun and short waiting times. However, her decision-making process influences the decisions of others. The presence of other tourists, who also choose facilities based on their own experiences and preferences, affects the queues at each location. The collective decisions of all tourists shape these queues, each acting on their assessments of enjoyment and waiting times. As time passes, some facilities may become busier, while others may see reduced waiting times. She must constantly adapt to these changing conditions, balancing her preferences for fun with the evolving waiting times. Therefore, the path-planning problem can be formulated as a general-sum congestion game with bandit feedback [64], [65]: we follow a policy to explore different paths to learn about their rewards (e.g., link quality and link capacity) or exploit the paths that offer the highest rewards and update the policy based on the rewards. And the rewards are influenced by collective decisions on paths. We gradually find out the optimal policy to select paths over edge networks.
The formal definitions and theoretical concepts underlying this formulation are provided in Appendix C. Specifically, we review general-sum matrix games, policy representations, Nash equilibrium and Nash regret, as well as potential and congestion games, together with different feedback models. In the following, we build upon these preliminaries to formulate a routing problem, define the corresponding optimization objective, and develop a game-theoretic algorithm with theoretical performance guarantees. In addition, we present a comparison of the mathematical models underlying Totoro and Totoro+ in Appendix B. A. Problem formulation A dataflow tree in Totoro+ consists of at most N nodes, and there are at most P paths to reach the root of the tree. Since each path p ∈ [P ] has different success rate, and capacity, we let Rp (·|k, θp ) ∈ [0, 1] denote the reward distribution for path p with mean rp (k, θp ) given that k nodes select path p with mean success rate being θp . The higher the mean success rates, the higher the rewards. In contrast, the more nodes select the same path, the less the rewards they receive as the success rate and data rate drop. Suppose the joint paths chosen by all nodes are denoted by p = [p1 , p2 , · · · , pN ], where pn denotes the path selected by node n, then we let np (p) denote the number of nodes selecting path p given the joint action p. A node n selects path p and gets the reward rn (p) drawn from the reward distribution Rp (·|np (p), θp ) with mean rp (np (p), θp ). Optimization objective. We aim to efficiently route T packets (such as gradients in many rounds) from a worker node to a master node, minimizing the overall time taken. In other words, our goal is to maximize total rewards. Also, since collective actions taken by all nodes influence the rewards, we resort to see how those actions affect others’ decisions. First, we define policy πn followed by node n to select paths, where πn is from the probability simplex over node n’s action space Pn , denoted by ∆(Pn ), where Pn ⊆ [P ] is the set of paths available for node n’s selection. Similarly, we can define a general policy π = [π1 , π2 , · · · , πN ] as a tuple in the joint space ∆(P1 ) × · · · × ∆(PN ). Hence, we can have i.i.d p = (p1 , p2 , · · · , pN ) ∼ π and pn ∼ πn . Then, since the policy influences the rewards the nodes receive, we use the rewards to represent the value of a policy. We define the value of policy π for node n as Vnπ = Ep∼π [rn (p)], where rn (p) = rpn (npn (p), θpn ). Let π−n be the marginal joint policy of nodes 1, · · · , n − 1, n + 1, · · · , N . We refer to [48], [63] to define the Nash Regret after T packets as Nash-Regret(T ) =
T X t=1
t π + ,π−n
max (Vn n
n∈[N ]
t
− Vnπ ),
(1)
t
where π t is the policy for packet t, Vnπ is the value of policy µ,π t π t for node n, πn+ = arg maxµ∈∆(Pn ) Vn −n represents the π + ,π t
best response of node n under policy π, and Vn n −n is the t value of the policy (πn+ , π−n ). The Nash Regret indicates the value difference between when a node unilaterally switches its policy and when it follows the same policy. The optimization
9
Algorithm 1 Game-theoretic distributed hop-by-hop routing algorithm Input: mixture weights α, β ∈ [0, 1]; initial policy πn1 for all n ∈ N . 1: for episode k = 1, 2, · · · do 2: for packet t = 1, · · · , τ do k 3: Each node n in parallel selects hop pk,t n ∼ πn to send a packet, observes reward rnk,t . 4: for node n = 1, · · · , N do in parallel 5: ρkn ← arg minλ∈∆(Pn ) det(M (λ)). k,t b kn Φ(p) ← 1 Pτ ψ(p)⊤ M (πnk )−1 ψ(pk,t 6: ∇ n )rn , for t=1 τ all p ∈ Pn . b kn Φ⟩. 7: π̃nk+1 ← arg maxλ∈∆(Pn ) ⟨λ, ∇ k k+1 k+1 8: πn ← α πn + β(π̃n − πnk ) + (1 − α)ρkn . | | {z } {z } Frank-Wolfe update
Exploration
objective is to learn a general policy π ∗ over T packets such that Nash-Regret(T ) ≤ ϵ,
(2)
where ϵ > 0 is a given tolerance threshold. B. Our algorithm We propose a game-theoretic distributed hop-by-hop routing algorithm based on the bandit feedback model [48], [60], [62], [66], [67]. The pseudo-code of the game-theoretic distributed hop selection algorithm is presented in Algorithm 1. The notations used in the algorithm are summarized in Appendix D. When node n receives a packet t in episode k from a previous node, it follows the current policy πnk to select the next hop pk,t n , sends the packet, and observes the corresponding reward rnk,t (line 3). Whenever node n has sent τ packets and collected τ rewards, it updates the policy πnk based on the τ rewards collected. First, we identify an exploratory policy with its policy correlation matrix: X M (λ) = λ(p)ψ(p)ψ(p)⊤ , (3) p∈λ
which has the minimum determinant among all possible policies in the probability simplex ∆(Pn ) over node n’s action space Pn (line 5), where λ(p) denotes the probability of selecting the next hop p, and ψ(p) represents the vector-valued function mapping hop p to a one-hot vector. Next, we use linear regression with τ rewards to estimate the gradient of the mapping from policy πnk to potential rewards for node n (line 6), where M (πnk )−1 represents the inverse of M (πnk ). We yield |Pn | gradient estimators, which form a b kn Φ = [∇ b kn Φ(p1 ), · · · , ∇ b kn Φ(p|P | )]. |Pn |-dimension vector ∇ n With the gradient estimator for all possible hops, we calculate the dot product of the estimator and all possible policies λ ∈ ∆(Pn ) and obtain the optimal policy π̃nk+1 that yields the maximum dot product (line 7). Lastly, we leverage the Frank-Wolfe method [68] to linear combine current policy πnk with optimal policy π̃nk+1 : πnk + β(π̃nk+1 − πnk ),
(4)
where β is in the range [0, 1]. The Frank-Wolfe update in Eq. (4) guarantees that the results of the linear combination fall in the probability simplex ∆(Pn ). In addition, we add exploratory policy ρkn to the Frank-Wolfe update (line 8): α πnk + β(π̃nk+1 − πnk ) + (1 − α)ρkn , (5) where α is also in the range [0, 1] and determines the extent to explore different policies. Node n follows the final policy πnk+1 by Eq. (5) to route packet τ +1 to τ +τ in episode k +1, and hence each episode k has individual policy πnk to route τ packets. We provide a numerical example to illustrate the workflow of Algorithm 1 in Appendix E, discuss how local congestion is observed and inferred at the application level in Appendix F, and analyze the implementation and adaptivity of Algorithm 1 in Appendix G. C. Theoretical analysis. We conduct a theoretical analysis on Algorithm 1 in two aspects: the Nash regret bound and time complexity. Theorem 1. Let T = kτ and assume that each policy in ∆(Pn ) has no zero element for all n. By running Algorithm 1 b kn Φ(p) defined in line 6 and exwith gradient estimator ∇ k ploratory policy ρn defined in line 5, if k ≥ N2 , then with probability 1 − δ, we have Nash-Regret(T ) ≤ Õ(N 2 T 5/6 log N ).
The proof details of Theorem 1 are given in Appendix H. The results in Theorem 1 demonstrate a sublinear Nash regret with polynomial dependence on N , the number of nodes. Following Definition 1 in [48] and Section 3 in [63], we obtain the following corollary. Corollary 1. Algorithm 1 reaches an ϵ-approximate Nash equilibrium. Corollary 1 tells us that nodes that run Algorithm 1 to update their policies can find a general policy such that a node receives at most ϵ more rewards by unilaterally changing its policy, implying reaching an ϵ-approximate Nash equilibrium. In addition, we provide the Nash regret guarantee under bounded asynchrony in the following corollary. Corollary 2. Under bounded asynchrony, the Nash regret guarantee in Theorem 1 continues to hold, up to an additional sublinear regret term induced by asynchrony. The proof details of Corollay 2 are given in Appendix I. Finally, we analyze the time complexity of Algorithm 1 in the following theorem. Theorem 2. The time complexity of Algorithm 1 in each episode is O(τ log3 N + |∆(Pn )| log3 N ), where τ represents the number of packets sent in each episode, and |∆(Pn )| denotes the number of policies node n can adopt. The proof details of Theorem 2 are given in Appendix J. VI. I MPLEMENTATION
10
We implement Totoro+ on top of the Pastry (v.2.1) [23] and PyTorch (v.2.10.0) [69] software stacks. Such implementation choice is motivated by the following considerations: (1) Pastry [49] is a widely used overlay and routing network for the implementation of a DHT similar to Chord [50]. Instead of implementing another distributed system core, we can leverage Pastry’s excellent routing substrate (e.g., O(log N ) node lookup), self-repairing routing table, message transportation layer, and scalable application-level multicast infrastructure (Scribe [70]). These features greatly simplify the development process. (2) PyTorch [24] provides a flexible and intuitive API for building neural networks. It also offers a rich ecosystem of libraries (e.g., TorchVision [71] and HuggingFace Transformers [72]) that support many modern neural network models. We made the following major modifications: (1) We changed the original single P2P ring structure to a new locality-aware P2P multi-ring structure. (2) We implemented a fully decentralized “many masters/many workers” architecture by utilizing DHTs and adding several data structures: a list of operations for tracking routing paths, selecting masters and workers, and constructing dynamically structured training trees. (3) We implemented a publish/subscribe messaging pattern for scalable model propagation and gradient aggregation. We introduced a serialization mechanism to convert trained models into binary arrays for low-cost communication over edge networks. (4) We introduced an advertise-discover mechanism to enable nodes to advertise and discover FL applications running over the overlay. We implemented a parallel recovery approach to dealing with the failure of masters and the failure of workers. (5) We implemented a game-theoretic path planning model to “autonomously” replan or repair the dynamically structured dataflow tree by collecting feedback, detecting node stragglers or failures, balancing network traffic, and creating alternative routes. We discuss the adaptivity of Totoro+ to edge heterogeneity in Appendix K.
VII. E VALUATION We evaluate Totoro+ ’s performance in a real-world distributed environment that includes 500 Amazon EC2 nodes and uses real-world computer vision (CV) and natural language processing (NLP) datasets at different scales. We have the following key results. Totoro+ scales the number of masters to handle a varying workload (from 125 to 2000 concurrently running FL applications) in real-world edge topologies (Section VII-B). + • Totoro achieves O(log N ) hops for model dissemination and gradient aggregation (Section VII-C). + outperforms state-of-the-art FL systems • Totoro (OpenFL [25] and FedScale [26]) by speeding up the training time 1.2×-14.0× to reach the equivalent model accuracy (Section VII-D). + • Totoro efficiently adapts to edge networks with constrained bandwidth capacity (Section VII-E). + • Totoro recovers from node failures to adapt to node churns (Section VII-F). •
A. Methodology Experimental setup. Totoro+ is designed to operate in large deployments with millions of edge nodes. However, such a deployment is prohibitively expensive and impractical in an academic environment. As such, we resort to emulating a realworld edge setting on 500 AWS EC2 t2.medium nodes, each of which has 2 vCPUs and 4GB of RAM, and 100 GB of disk: (1) we use one JVM to represent one edge node and emulate up to 100k edge nodes on the testbed; (2) we divide the 100k edge nodes into geo-distributed zones based on the real-world EUA dataset [73], which consists of 95,271 edge nodes distributed across 12 Australian states and regions. To emphasize the system-level benefits of Totoro+ , we conduct experiments using homogeneous nodes in the main paper. Experimental results under heterogeneous node settings are reported in Appendix L. Baselines. We use OpenFL (v.1.3) [25] and FedScale (v.0.5) [26] as the baseline. FedScale is a scalable and extensible open-source FL system and benchmarking suite developed by Symbiotic Lab [74], which provides high-level and flexible API to implement, evaluate, and deploy FL algorithms easily in both standalone (single CPU/GPU) and distributed (multiple machines) settings. OpenFL is an open-source framework developed by Intel that runs FL in a single-machine setting. Parameters. Totoro+ ’s Pastry DHT is configured with a leaf set of 24, max open sockets of 5000, and a transport buffer size of 6 MB. We configure different fanouts 8 (23 ), 16 (24 ), and 32 (25 ) for Totoro+ ’s dataflow trees by changing the DHT routing table base bit values to 3, 4, and 5, respectively. The minibatch size of each node is 20 in image classification and speech recognition tasks. The initial learning rate for the ShuffleNet V2 model is 0.05 and 0.1 for the ResNet-34 model. Metrics. We focus on Totoro+ ’s scalability, adaptivity, and FL effectiveness. To evaluate scalability, we measure how numerous applications’ dataflow trees are distributed over largescale edge topologies. We also measure how Totoro+ scales with the number of nodes in terms of model broadcast time and gradient aggregation time. To evaluate the FL effectiveness, we measure time-to-accuracy performance, which is the duration of model training tasks on the testing set to achieve the target accuracy. To evaluate adaptivity, we measure cumulative packet latency, Nash regret, node selection frequencies, and failure recovery time. We also measure Totoro+ ’s runtime overhead. B. Scalability analysis Figure 5(a) shows the real-world edge zones generated from the EUA dataset [73]. Australian Communications and Media Authority publishes the EUA dataset [73], which contains the geographical locations of 95,271 cellular base stations in 12 states of Australia (ACT: 931, ANT: 15, EXT: 8, ISL: 36, NSW: 24574, NT: 3137, QLD: 21576, SA: 7682, TAS: 3213, VIC: 18163, WA: 15933, WLD: 3). We estimate the maximum roundtrip time based on the distances between nodes in the dataset, and then use Ratnasamy and Shenker’s distributed binning algorithm [55] to divide them into different zones. Totoro+ fairly distributes masters. Figure 5(b) shows the normal probability plot of the number of masters mapped on