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

trigger handshakes when lighthouse reply arrives #246

Merged
merged 4 commits into from
Jul 22, 2020

Commits on Jun 26, 2020

  1. refactor HandshakeManager.handleOutbound

    This will let us trigger this method directly in the next commit.
    wadey committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    f5965d7 View commit details
    Browse the repository at this point in the history
  2. trigger handshakes when lighthouse reply arrives

    Currently, we wait until the next timer tick to act on the lighthouse's
    reply to our HostQuery. This means we can easily add hundreds of
    milliseconds of unnecessary delay to the handshake. To fix this, we
    can introduce a channel to trigger an outbound handshake without waiting
    for the next timer tick.
    
    A few samples of cold ping time between two hosts that require a
    lighthouse lookup:
    
        before (v1.2.0):
    
        time=156 ms
        time=252 ms
        time=12.6 ms
        time=301 ms
        time=352 ms
        time=49.4 ms
        time=150 ms
        time=13.5 ms
        time=8.24 ms
        time=161 ms
        time=355 ms
    
        after:
    
        time=3.53 ms
        time=3.14 ms
        time=3.08 ms
        time=3.92 ms
        time=7.78 ms
        time=3.59 ms
        time=3.07 ms
        time=3.22 ms
        time=3.12 ms
        time=3.08 ms
        time=8.04 ms
    
    I recommend reviewing this PR by looking at each commit individually, as
    some refactoring was required that makes the diff a bit confusing when
    combined together.
    wadey committed Jun 26, 2020
    Configuration menu
    Copy the full SHA
    5f0c223 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2020

  1. Configuration menu
    Copy the full SHA
    68c015b View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2020

  1. Configuration menu
    Copy the full SHA
    cf48f1c View commit details
    Browse the repository at this point in the history