Skip to content

Reliable restart support for signaling server #1

Description

@DhirajBhakta

Issue

As of this writing, signaling server is heavily stateful, maintaining registry of active connections. Any kind of restart on this server will imply total loss of information/connections. DB is not an option as the "information" here is a websocket connection. Since the main websocket does not yet have a handler for onclose event to take care of abrupt server restarts, we lose the central registry contents

Why do we need the signaling server?

  • Donee needs to get a listing of 'available servers' from a central place.
  • available donor servers need to send 'heartbeat' or metrics at regular intervals to a central place.
  • We need this central place to perform google Oauth login from the command line vt login

Proposed Solution

  • setup the onClose handler for main socket
  • continuously ping the signaling server for its "Health" API. ..do this until you get a "healthy" response.
  • upon receiving healthy, re-establish the main websocket connection.

Declarative Invariants

  • At all times, the central server maintains a registry of active connections to all donors/available donor servers.
  • As long as the donor server is active, it will keep sending metrics to the central server

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions