tailscale / tailscale/tailscale
controlclient: support going online when control is unreachable (cache netmaps)
- Dominant language
- Go
- Stars
- 36.5k
- Forks
- 3.2k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 132
Description
If the control plane is unreachable (either due to the local network conditions or a control server outage), it should still be possible to go online, at least in a limited state, by using a cached copy of the last known network configuration.
Most servers and subnet routers don't change their endpoints/DERP home often, so would still be reachable.
In the future we will also likely more control plane messaging to be between peers (as we did earlier with endpoint info) so the effect of a control outage would be even less. (e.g. imagine designating 1+ always-on tailscaled in your tailnet to be backup control plane messaging nodes that can take the role of the control plane during an outage. with the appropriate crypto it can all be trustless even, similar to the derp protocol)
In any case, first step is making the client cache netmaps so they can transition from offline to online (WantRunning false to true) and get to ipn.State Running without a control connection active. (a health warnable would still be firing saying the control connection was down)
--
**Edit 2025-11-18**: this work is underway.
Some subtasks:
- [x] #17941 permit turning off control plane network sync for testing (~done)
- [x] #17979 add featuretag for CacheNetMap
- [x] #18485 make per-profile var directories for extensions (taildrop, netmap caching, TKA) to use
- [x] #18530 write netmap to disk, use it on startup
- [ ] add integration tests (maybe in natlab too, to verify NAT traversal still works when disconnected from control + node restarts offline)
- [ ] advertise DiscoKey changes over TSMP (under WireGuard encryption) peer-to-peer
- [ ] #17989 remember last home DERP and use that over netcheck measurements before control's up
- [ ] Add a node attribute to control whether netmap caching is used (per node).
- [ ] (maybe) Add a local debug(?) API to control whether netmap caching is used
....
Contributor guide
Research direction
Start with the controlclient state transition from WantRunning false to true and the existing netmap-on-disk work described in the issue. The remaining scope includes integration tests for disconnected operation and node restarts, plus peer-to-peer DiscoKey updates and DERP selection; done requires the relevant subtasks and offline behavior to be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100