Sometimes one end will show latency spikes at different times from the other. (See attached - both sides of the same connection at the same time, different graphs.)


Some possible explanations:
- The sampling rate of 1/second is too slow. Latency spikes are much shorter than 1 second and the peers are not necessarily sending/recieving pings at the same time.
- For some reason the round trip time is slower in one direction than the other.
- Could the browser affect the latency, for example by deprioritizing it when it isn't selected? This would explain why I sometimes see latency spikes even when testing locally.
Fixes could include having only one peer initiate pings, and send the results to the other peer, increasing the sampling rate, or graphing the median ping over a certain window (or a weighted average or something).
Possible fixes, depending on what the source is:
Sometimes one end will show latency spikes at different times from the other. (See attached - both sides of the same connection at the same time, different graphs.)


Some possible explanations:
Fixes could include having only one peer initiate pings, and send the results to the other peer, increasing the sampling rate, or graphing the median ping over a certain window (or a weighted average or something).
Possible fixes, depending on what the source is: