Skip to content

backendcluster: route PD and backend traffic through cluster DNS#1107

Draft
YangKeao wants to merge 4 commits intopingcap:mainfrom
YangKeao:pr/06-multi-cluster-dns
Draft

backendcluster: route PD and backend traffic through cluster DNS#1107
YangKeao wants to merge 4 commits intopingcap:mainfrom
YangKeao:pr/06-multi-cluster-dns

Conversation

@YangKeao
Copy link
Member

@YangKeao YangKeao commented Mar 19, 2026

What problem does this PR solve?

Issue Number: close #1101

What is changed and how it works:

Add cluster-scoped DNS routing for backend-cluster traffic.

This PR makes each backend cluster use its configured ns-servers for:

  • PD / etcd traffic
  • infosync-related topology lookups
  • backend HTTP / MySQL traffic created from the cluster runtime

If ns-servers is empty, the default system resolver is still used.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 19, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 19, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign djshow832 for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added the size/XXL label Mar 19, 2026
@YangKeao YangKeao force-pushed the pr/06-multi-cluster-dns branch from 89a6930 to b862360 Compare March 19, 2026 17:33
@YangKeao YangKeao marked this pull request as ready for review March 19, 2026 17:38
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 67.04438% with 349 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@ca24d03). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/testkit/dns_server.go 0.00% 95 Missing ⚠️
pkg/manager/backendcluster/manager.go 65.50% 72 Missing and 17 partials ⚠️
pkg/manager/backendcluster/metrics_querier.go 65.51% 27 Missing and 3 partials ⚠️
pkg/util/etcd/etcd.go 60.00% 19 Missing and 9 partials ⚠️
lib/config/proxy.go 83.33% 15 Missing and 6 partials ⚠️
pkg/proxy/proxy.go 15.38% 9 Missing and 2 partials ⚠️
pkg/balance/router/port_conflict_detector.go 67.74% 7 Missing and 3 partials ⚠️
pkg/util/netutil/dns.go 85.07% 7 Missing and 3 partials ⚠️
pkg/balance/observer/health_check.go 74.19% 5 Missing and 3 partials ⚠️
pkg/proxy/backend/backend_conn_mgr.go 66.66% 6 Missing and 2 partials ⚠️
... and 9 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1107   +/-   ##
=======================================
  Coverage        ?   66.84%           
=======================================
  Files           ?      148           
  Lines           ?    15564           
  Branches        ?        0           
=======================================
  Hits            ?    10403           
  Misses          ?     4447           
  Partials        ?      714           
Flag Coverage Δ
unit 66.84% <67.04%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@YangKeao
Copy link
Member Author

/test all

@YangKeao YangKeao force-pushed the pr/06-multi-cluster-dns branch 2 times, most recently from 5de2f71 to 7138f42 Compare March 20, 2026 06:20
@YangKeao
Copy link
Member Author

/test all

@YangKeao YangKeao force-pushed the pr/06-multi-cluster-dns branch 8 times, most recently from 8e19ba1 to 7ae1f88 Compare March 24, 2026 14:08
@YangKeao YangKeao force-pushed the pr/06-multi-cluster-dns branch from 7ae1f88 to ae9279c Compare March 24, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Route PD and backend traffic through cluster DNS.

2 participants