-
Notifications
You must be signed in to change notification settings - Fork 28
Naming Rules of `NodeId`s
Hiroki Kobayashi edited this page Oct 15, 2019
·
2 revisions
A NodeId
is a 7-byte hex string, attached with device_no, the owner's IP address and its RPC-accepting port:
00bbbbbbssssmm.d@ip:port
where b,s,m
denote a hex-digit (4 bits), ip
denotes an IP address, and port
denotes a port number.
field | description |
---|---|
bbbbbb (24-bit) | bucket_no |
ssss (16-bit) | segment_no |
mm (8-bit) | member_no. This node is the mm-th member of ssss-th segment of bbbbbb-th bucket. In range [0, k + m). |
d (32-bit) | device_no. This number is not included in a LumpId. |
https://github.com/frugalos/frugalos/blob/0.14.0/src/service.rs#L197