[PR #5245] [CLOSED] [client] Fix/win dns batch #25365

Open
opened 2026-08-05 07:05:54 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5245
Author: @pappz
Created: 2/3/2026
Status: Closed

Base: mainHead: fix/win-dns-batch


📝 Commits (3)

  • a33f60e Adds timing measurement to handleSync to help diagnose sync performance issues
  • a72e0e6 Optimize Windows DNS performance with domain batching and batch mode
  • 85e4afe Refactor route manager to use sync.Once for wgInterface access

📊 Changes

7 files changed (+201 additions, -19 deletions)

View changed files

📝 client/internal/dns/host_windows.go (+24 -11)
📝 client/internal/dns/host_windows_test.go (+102 -1)
📝 client/internal/dns/mock_server.go (+10 -0)
📝 client/internal/dns/server.go (+37 -4)
📝 client/internal/dns/server_export_test.go (+6 -1)
📝 client/internal/engine.go (+4 -0)
📝 client/internal/routemanager/manager.go (+18 -2)

📄 Description

POC for routes speed up

Describe your changes

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/__

Summary by CodeRabbit

  • Bug Fixes

    • Improved Windows DNS rule handling by batching domains (maximum 50 per rule) for better management of large domain lists.
  • Performance Improvements

    • Optimized DNS operations and route management with batch processing to reduce redundant reconfigurations.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5245 **Author:** [@pappz](https://github.com/pappz) **Created:** 2/3/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/win-dns-batch` --- ### 📝 Commits (3) - [`a33f60e`](https://github.com/netbirdio/netbird/commit/a33f60e3fdb8cd96eac23edcb409c4d3afc20e96) Adds timing measurement to handleSync to help diagnose sync performance issues - [`a72e0e6`](https://github.com/netbirdio/netbird/commit/a72e0e67e5a6e57a12b0455385b604a2aa825136) Optimize Windows DNS performance with domain batching and batch mode - [`85e4afe`](https://github.com/netbirdio/netbird/commit/85e4afe100d35b6f3c2ad54b3c5d46df39c8ed9f) Refactor route manager to use sync.Once for wgInterface access ### 📊 Changes **7 files changed** (+201 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/host_windows.go` (+24 -11) 📝 `client/internal/dns/host_windows_test.go` (+102 -1) 📝 `client/internal/dns/mock_server.go` (+10 -0) 📝 `client/internal/dns/server.go` (+37 -4) 📝 `client/internal/dns/server_export_test.go` (+6 -1) 📝 `client/internal/engine.go` (+4 -0) 📝 `client/internal/routemanager/manager.go` (+18 -2) </details> ### 📄 Description POC for routes speed up ## Describe your changes ## Issue ticket number and link ## Stack <!-- branch-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](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/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved Windows DNS rule handling by batching domains (maximum 50 per rule) for better management of large domain lists. * **Performance Improvements** * Optimized DNS operations and route management with batch processing to reduce redundant reconfigurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 07:05:54 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#25365