[PR #4545] [client, signal] Refactor/reduce signaling #4295

Open
opened 2025-11-20 08:08:06 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/4545

State: open
Merged: No


Describe your changes

When the client sends a signaling offer or answer, the Signal server may return an error if the message cannot be delivered. The client then checks the error type to decide how to proceed:

  • If the error suggests the remote peer is unavailable, the client waits for the peer instead of retrying immediately.
  • If the method is not implemented, then switch back to the original retry mechanism (backward compatibility case)
  • If the error indicates another error, the client retries by sending a new offer.

Whenever a peer reconnects to the signaling server and no active peer connection exists, it must send a new offer. This ensures that any signaling messages lost while the peer was offline are recovered and the connection can be re-established.

The NB_DISABLE_SEND_WITH_DELIVERY_CHECK: true|false option can be used to enforce that clients always use the server’s original methods.

For the review, keep in mind that these Signal server changes must support both old and new clients, and old clients must still connect properly with each other.

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

**Original Pull Request:** https://github.com/netbirdio/netbird/pull/4545 **State:** open **Merged:** No --- ## Describe your changes When the client sends a signaling offer or answer, the Signal server may return an error if the message cannot be delivered. The client then checks the error type to decide how to proceed: - If the error suggests the remote peer is unavailable, the client waits for the peer instead of retrying immediately. - If the method is not implemented, then switch back to the original retry mechanism (backward compatibility case) - If the error indicates another error, the client retries by sending a new offer. Whenever a peer reconnects to the signaling server and no active peer connection exists, it must send a new offer. This ensures that any signaling messages lost while the peer was offline are recovered and the connection can be re-established. The NB_DISABLE_SEND_WITH_DELIVERY_CHECK: true|false option can be used to enforce that clients always use the server’s original methods. For the review, keep in mind that these Signal server changes must support both old and new clients, and old clients must still connect properly with each other. ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__
saavagebueno added the pull-request label 2025-11-20 08:08:06 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#4295