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

Dynamically switch between local and remote cluster #55

Open
4 tasks
mihirnimgade opened this issue Jul 1, 2023 · 0 comments
Open
4 tasks

Dynamically switch between local and remote cluster #55

mihirnimgade opened this issue Jul 1, 2023 · 0 comments
Labels
enhancement New feature or request high-priority

Comments

@mihirnimgade
Copy link
Member

mihirnimgade commented Jul 1, 2023

The idea is to be able to run a local and remote cluster at the same time and have the telemetry link fallback to making requests to the local cluster if remote cluster requests start to fail.

The reason we want to support this is to cover the case where you have intermittent/unreliable internet access on the telemetry link host. When internet access goes down, the telemetry link will automatically switch over to using the local cluster which means access to telemetry data (at least the data coming from the radio) is uninterrupted during race time.

Here's what potential implementations might look like:

  1. Modify the futures done callback to try making a request to the local cluster if the remote cluster request fails. This is probably the simplest implementation. One advantage with this approach is that loss of data is very unlikely.

  2. Once a certain number of requests to the remote cluster fail, switch the request URL to the local cluster. The subsequent requests will be made to the local cluster. This does mean that some messages get lost during the remote to local switch. After switching to the local cluster, spin up a background thread that periodically pings the remote cluster. Once the background thread indicates that the remote cluster is accessible again, switch the request URL back to point to the remote cluster. Requests will then be made to the remote cluster.

TODO

  • Add command-line argument to link_telemetry.py that enables/disables dynamic switching.
  • Add new fields to the telemetry.toml for the two sets (local and remote) of URLs and secret keys.
  • Update relevant documentation.
  • Update telemetry.toml template.
@mihirnimgade mihirnimgade added enhancement New feature or request high-priority labels Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high-priority
Projects
None yet
Development

No branches or pull requests

1 participant