Gossip-based DNS embedded in the router.
- Nameserver holds a sorted list of (hostname, peer, container id, ip) tuples. - Entries are gossiped using topology gossip / broadcast - only new/updated entries are propogated as expected. - Entries for a given peer are removed when the connection to the peer is lost. - Entries are tombstoned when containers die. Tombstones are kept for 10mins, as they do not need to survive partition, only gossip propagation delay.
This commit is contained in:
1 parent
01f7201a9e
commit
8b061fd555
32 files changed
+1528
-329
No files matched your search
@@ -98,3 +98,10 @@ func Min(a, b Offset) Offset {
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func (addr Address) Reverse() Address {
|
||||
return ((addr >> 24) & 0xff) | // move byte 3 to byte 0
|
||||
((addr << 8) & 0xff0000) | // move byte 1 to byte 2
|
||||
((addr >> 8) & 0xff00) | // move byte 2 to byte 1
|
||||
((addr << 24) & 0xff000000) // byte 0 to byte 3
|
||||
}
|
||||
Reference in new issue
Block a user