-
Notifications
You must be signed in to change notification settings - Fork 10
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
Example: Count all IP addresses close to a target key #33
Conversation
Added a histogram at the end of the lookups. This gives us insights into the probability a nodes is found within a given search. The graph is not the easiest to read. I am constrained by the library. Nonetheless, it shows the distribution quite well. Here is short explanation on how you can read this histogram:
Default Bootstrap Nodes - 23 IPs found - 55 lookups - Example 1It's almost always the 17+1=18 same nodes. One node has a 50% chance and then there is a long tail.
Default Bootstrap Nodes - 21 IPs found - 51 lookups - Example 2Similar to the first example. 17+1+1=19 nodes are almost always found. Additional 2 nodes are found
Randomized Bootstrap Nodes - 50 IPs found - 50 lookups - Example 3Randomizing bootstrap nodes increases the sloppyness heavily. 10+2+3=15 nodes are hit with a chance of >75% for each lookup. 1+2+3+1+2=9 nodes have an average chance of ~40% of being hit and then there is a long tail of 23+3=26 nodes that might be hit occasionally.
Randomized Bootstrap Nodes - 44 IPs found - 54 lookups - Example 4The same 11+6=17 nodes are basically hit all the time. 3+1+1=5 nodes are hit every ~50% and the long tail of 4+18=22 nodes are hit rarely.
I hope this gives enough insights into how sloppy the algorithm is. Randomizing bootstrap nodes definitely adds randomness and should be added as an option in the library. |
All checks pass. Ready to merge IMO. |
Adds an example to count all unique IP address around a target key. Used to test how sloppy the algorithm is in finding a key.
The algorithm
Random Boostrap Nodes 1
Random Boostrap Nodes 2
Default Boostrap Nodes 1
Default Boostrap Nodes 2
Findings: