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

give a long gregor reconnect backoff to devices that don't send chats #9720

Merged
merged 2 commits into from Dec 12, 2017

Commits on Dec 12, 2017

  1. revendor rpc

    oconnor663 committed Dec 12, 2017
    Configuration menu
    Copy the full SHA
    4dbc8d2 View commit details
    Browse the repository at this point in the history
  2. give a long gregor reconnect backoff to devices that don't send chats

    This should mitigate some of the reconnect flood that the gregor servers
    have to deal with when they restart. Most idle clients in the wild
    aren't participating in chat, and don't need to reconnect very
    aggressively.
    
    There were a few different heuristics we could've used here, and others
    we might want to use in the future. One in particular we almost chose
    was "has this user ever received a message". However, we sometimes send
    system-wide messages, like when Linux updates are broken, which could
    confuse that heuristic. Chat sending is a surer sign of activity than
    receiving, and it also has the benefit of being
    individual-device-specific.
    
    Two things had to change to make this work. First, we had to configure a
    chat-activity-based backoff (using a couple new keys in LevelDB).
    Second, we had to make sure that the backoff was respected on reconnect,
    which required the new ForceInitialBackoff ConnectionOpts parameter
    upstream, since we don't keep a persisitent Connection object after
    disconnects.
    oconnor663 committed Dec 12, 2017
    Configuration menu
    Copy the full SHA
    069968a View commit details
    Browse the repository at this point in the history