Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network Improvements to TaskManager in Neo 3.0 - Prefer lower latency & higher availability nodes #542

Open
jsolman opened this issue Jan 12, 2019 · 0 comments
Assignees
Labels
discussion Initial issue state - proposed but not yet accepted enhancement Type - Changes that may affect performance, usability or add new features to existing modules. p2p Module - peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP).

Comments

@jsolman
Copy link
Contributor

jsolman commented Jan 12, 2019

While the network should still communicate with nodes randomly to ensure decentralization, it could weight it's random selection based on node health as determined by latency, availability, etc.

(Following two paragraphs taken from one of my responses on #522)

By measuring network latency and entire "data request request/response" latency and keeping track of these per remote node we can optimizing the network and potentially protect against bad actors. Recently, to prevent waiting too long for block data, there was the change that allows the block to be requested from up to 3 remote nodes. If we knew more about the health (average network and data latencies) of the nodes from which blocks are requested, we could weight down talking to unhealthy nodes and have better confidence with using less redundancy. This would require a number of changes to TaskManger.

Currently the first to respond with block hashes are the ones that get the task to return block data. This already has the effect somewhat of having nodes with lower latency serve requests; however, responding to getblocks could be mostly an in memory operation, while responding to getdata for a block far in the past could be more a disk operation. So, a node asking for some blocks far back in the chain may be faster than others to respond to getblocks and slower than others to respond to getdata. Having metrics of 'data request/response latency' for connected remote nodes could help factor this in if a scheduling algorithm were built into TaskManger that took into account more information about all the connected remote nodes when making data requests.

@jsolman jsolman changed the title Network Protocol: Generally prefer communicating with lower latency nodes Network Protocol: Generally prefer communicating with lower latency & higher availability nodes Jan 12, 2019
@erikzhang erikzhang added the discussion Initial issue state - proposed but not yet accepted label Jan 12, 2019
@jsolman jsolman changed the title Network Protocol: Generally prefer communicating with lower latency & higher availability nodes Network Improvements to TaskManager in Neo 3.0 - Prefer lower latency & higher availability nodes Mar 7, 2019
@jsolman jsolman added this to the NEO 3.0 milestone Mar 7, 2019
@jsolman jsolman self-assigned this Mar 8, 2019
@lock9 lock9 added enhancement Type - Changes that may affect performance, usability or add new features to existing modules. p2p Module - peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP). labels Aug 12, 2019
@Tommo-L Tommo-L mentioned this issue Dec 4, 2019
7 tasks
@erikzhang erikzhang removed this from the NEO 3.0 milestone Dec 6, 2019
Thacryba pushed a commit to simplitech/neo that referenced this issue Feb 17, 2020
* add 2.7.4

add 2.7.4

* minor updates

minor updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted enhancement Type - Changes that may affect performance, usability or add new features to existing modules. p2p Module - peer-to-peer message exchange and network optimisations, at TCP or UDP level (not HTTP).
Projects
None yet
Development

No branches or pull requests

3 participants