mirror of https://github.com/status-im/swarms.git
Provide some answers and updates (#181)
This commit is contained in:
parent
bce72b000b
commit
dff1aa44d9
|
@ -20,23 +20,48 @@ Discovery protocol will allow us to dynamically change the number of server peer
|
|||
The biggest challenge may be increased CPU and network usage. This needs to be carefully measured and we may end up with proposing some protocol changes.
|
||||
|
||||
### Product Description
|
||||
|
||||
This is a research swarm. It must provide answers to the following questions:
|
||||
- [ ] CPU/network increase usage. How does it change in absolute and relative values? How to reproduce the measurement?
|
||||
- [ ] Can we turn on and off discovery protocol when the node is running?
|
||||
- [ ] Can Discovery V5 protocol carry more information than protocol name and version? How can we distinguish Light Whisper nodes or Whisper nodes with MailServer capability? Notice that revealing this information (like Light Whisper node) may increase a chance to reveal the peer identity. The fact that we don’t want mobile phones to be each other peers raises this question.
|
||||
- [ ] How to make sure that connecting to the cluster will be fast? When the app goes to the background, does it take significantly more time to find peers? Do we need to use cache? From the cluster perspective, how to autoscale cluster so that its free capacity is always high?
|
||||
- [ ] How to make sure that there are always at least `N` peers with given capabilities? For instance, we always want to have at least `K` Whisper, `L` MailServer and `M` LES peers connected.
|
||||
|
||||
#### Q: CPU/network increase usage. How does it change in absolute and relative values? How to reproduce the measurement?
|
||||
|
||||
**A:** TBD
|
||||
|
||||
|
||||
#### Q: Can we turn on and off discovery protocol when the node is running?
|
||||
|
||||
**A:** Yes. First of all, we can tell how often the Discovery V5 should search for new peers with a given topic. Also, as we implemented Discovery V5 as a peer pool, we managed the list of peers. If the number of peers found for all topics is equal or exceed the upper limit, we can disable Discover V5 completely.
|
||||
|
||||
|
||||
#### Q: Can Discovery V5 protocol carry more information than protocol name and version? How can we distinguish Light Whisper nodes or Whisper nodes with MailServer capability? Notice that revealing this information (like Light Whisper node) may increase a chance to reveal the peer identity. The fact that we don’t want mobile phones to be each other peers raises this question.
|
||||
|
||||
**A:** Topic can be an arbitrary `key=value` pair. The rest will be answer later...
|
||||
|
||||
|
||||
#### Q: How to make sure that connecting to the cluster will be fast? When the app goes to the background, does it take significantly more time to find peers? Do we need to use cache? From the cluster perspective, how to autoscale cluster so that its free capacity is always high?
|
||||
|
||||
**A**: We need a cache to quickly provide the list of recently used peers. If the app fails to connect to them, it will use Discovery V5 in fast mode (checking for new peers more often).
|
||||
|
||||
To use Discovery V5, we need to set up bootnodes, however, they can use the existing server nodes, provided that they advertise Discovery V5 topics.
|
||||
|
||||
*Provide answer for cluster autoscaling.*
|
||||
|
||||
|
||||
#### Q: How to make sure that there are always at least `N` peers with given capabilities? For instance, we always want to have at least `K` Whisper, `L` MailServer and `M` LES peers connected.
|
||||
|
||||
**A:** This is implemented in [`github.com/status-im/status-go/geth/peers`](https://github.com/status-im/status-go/tree/develop/geth/peers) package. For each topic we are interested in, a lower and upper limits are provided. `PeerPool` and `TopicPool` take care of maintaining the number of peers within the limits.
|
||||
|
||||
|
||||
### Requirements & Dependencies
|
||||
The discovery protocol should be testable locally with Docker, but for some more extensive tests, we will utilse a Docker Swarm cluster.
|
||||
|
||||
### Minimum Viable Product
|
||||
Goal Date: 2018-04-08
|
||||
Goal Date: 2018-04-27
|
||||
|
||||
Description:
|
||||
1. All questions described in Product Description are researched and answered,
|
||||
1. It's possible to start statusd and Status App with DiscV5 enabled instead of static nodes (switch between them with a flag would be great),
|
||||
1. There is an automated way to collect CPI and network usage metrics in an isolated environment.
|
||||
1. It's possible to start `statusd` and Status App with DiscV5 enabled instead of static nodes (switch between them with a flag would be great),
|
||||
1. There is an automated way to collect CPU and network usage metrics in an isolated environment.
|
||||
|
||||
#### Exit criteria
|
||||
|
||||
|
|
Loading…
Reference in New Issue