Status update is done when only LastSeen is changed #632

Closed
opened 2025-12-29 02:21:24 +01:00 by adam · 0 comments
Owner

Originally created by @TotoTheDragon on GitHub (Feb 11, 2024).

Bug description

Environment

  • OS: N/A
  • Headscale version: v0.23-alpha
  • Tailscale version: N/A

Relevant code part: c3257e2146/hscontrol/poll.go (L550-L568)

When headscale updates the online node status after a keep alive, it will send a PeerChange to all of its peers.
c1c50cfcc0/tailcfg/tailcfg.go (L2646-L2649)
The tailscale client does not make use of LastSeen unless there is a state change with the online status.

It would be better if we only send updates if the online status is changed. This saves a lot of unnecessary syncing.

Originally created by @TotoTheDragon on GitHub (Feb 11, 2024). <!-- Before posting a bug report, discuss the behaviour you are expecting with the Discord community to make sure that it is truly a bug. The issue tracker is not the place to ask for support or how to set up Headscale. Bug reports without the sufficient information will be closed. Headscale is a multinational community across the globe. Our language is English. All bug reports needs to be in English. --> ## Bug description <!-- A clear and concise description of what the bug is. Describe the expected bahavior and how it is currently different. If you are unsure if it is a bug, consider discussing it on our Discord server first. --> ## Environment <!-- Please add relevant information about your system. For example: - Version of headscale used - Version of tailscale client - OS (e.g. Linux, Mac, Cygwin, WSL, etc.) and version - Kernel version - The relevant config parameters you used - Log output --> - OS: N/A - Headscale version: v0.23-alpha - Tailscale version: N/A Relevant code part: https://github.com/juanfont/headscale/blob/c3257e2146304c52e588c6de2fd28bcc0f13b1ad/hscontrol/poll.go#L550-L568 When headscale updates the online node status after a keep alive, it will send a PeerChange to all of its peers. https://github.com/tailscale/tailscale/blob/c1c50cfcc047c65dbf230bf463d47a806d2f2210/tailcfg/tailcfg.go#L2646-L2649 The tailscale client does not make use of LastSeen unless there is a state change with the online status. It would be better if we only send updates if the online status is changed. This saves a lot of unnecessary syncing.
adam added the bug label 2025-12-29 02:21:24 +01:00
adam closed this issue 2025-12-29 02:21:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#632