Distributed Registry
Cluster-wide actor discovery and location-transparent messaging.
Overview
The distributed registry allows actors to be discovered across the cluster without knowing which node they're running on. It provides:
- Location Transparency — Send to actors by name, not address
- Automatic Discovery — Registry synced via gossip protocol
- Failure Handling — Down nodes' actors automatically removed
Registering Actors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Looking Up Actors
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Using ClusterClient
ClusterClient provides a high-level API for cluster-aware messaging:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ClusterClient maintains a connection pool and automatically routes messages to the correct node based on the distributed registry.
How It Works
Message Flow
Registry Sync via Gossip
Complete Example
cluster_service.rs
rust1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
