Network Latency Metric
It must be possible to test bandwidth and latency of visors in the skywire network.
the node is rated or ranked on three categories:
- uptime
- bandwidth
- latency
histogram of rating for each category
Route Loop
- choose public key
- setup a route, that goes from A to B to C to X, (The target public key), then Go Y, X, A
N1 -> N2 -> X -> N3 -> N1 where you are N1
So I am connecting to myself through a route going through a specific node
- open up ~16 routes like that, send some data and measure histogram of time it took or if it failed
we can do that across all nodes, randomly selected then we tabulate, number of success/failures of routes that went through a specific node/public key
Its not always going to be 100% even if node is perfect; because a random route could go through a bad node.
But if the number is low, then we can have automatic transports either disconnect from those nodes (because they are unreliable) OR we can put more connections to them (because they are not reachable on network)
histogram
- How many routes of length 1 are there between X and Y
- How many routes of length 2 are there between X and Y
- How many routes of length 3 are there between X and Y
- etc...
and you can also graph for fixed X and random Y OR for Random X and Random Y and average the histogram
We assume routes cannot go through the same node twice.
https://www.geeksforgeeks.org/count-possible-paths-two-vertices/ https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm
This tells you, given the network graph; what shortest paths are to any node in network.
So you dont have to rely on route finding; you just download route graph; and compute this and it tells you shortest paths
then you send route to route setup
There are three seperate services
- Transport Graph / Network information
- Route Finding
- Route Setup
Eventually # 2 (Route Finding) can be eliminated and be done client side or as a locally runnable service or something that is run on client network.
> if i ping a visor in my own network or which is connected to the same ISP, i should expect lower latency than connecting to a visor in another country, unless we tell a remote visor to return the results of pinging another remote visor to your local visor. Even then, its relative to the visor which conducts the test.
it depends; for "random route" of length N over network graph, is probably same. Its an average over 60 samples
order1: route: x -> a -> y -> b -> x order2: route: x -> a1 -> a2 -> y -> b1 -> b2 -> x
do N random routes.
Then histogram of latency.
score is function of distribution of latencies across the N random routes. minimum latency is lower bound, over ~60 routes or all for randomly selected nodes
latency has mean and also has variance (or jitter)
latency is actually a measure of average congestion, relative to bandwidth