Skip to content

Implement route health check and recovery #5

Description

@zephiyr

Problem Statement

During the lifetime of a route, various things can happen: the tunnel connection can be lost, a user's access can be revoked invalidating their routes, etc. A periodic check of the route and it's status are necessary to handle these cases.

Proposed Solution

Add a background task that queries the associated route, reviews its status and responds accordingly. The most common initial case is that the connection to piko closes, transitions the route state to DOWN, and needs to be reopened. In the future, this background task will be where token rotation gets implemented

Exit Criteria

  • A background job is started when a wormhole is opened
  • The background job queries for its own associated route and passes this to any available handlers
  • An API call that 404s for a route shuts down the wormhole-cli process
  • A simple handler is created to reestablish a piko connection
  • The job execution cycle is configurable
  • A threshold for failed handler attempts is configurable (i.e. after N attempts, shutdown)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions