pingcap / pingcap/tiproxy

Separate BackendFetcher from HealthCheck

Open
#450 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
73
Forks
41
Avg merge
21h 3m
Merged PRs (30d)
21

Description

Development Task

Currently, BackendFetcher fetches the backend list every 3 seconds, together with health check. When fetching backends fails, it infinitely retries.

However, TiProxy doesn't need to fetch the backends so frequently, especially when there are tens of TiProxy and PD becomes the bottleneck, TiProxy may take more time to fetch the backend list, delaying health check. For scale-in, TiProxy can detect it from health check. For scale-out, TiProxy doesn't need to detect it so in time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Go implementations and scheduling paths for BackendFetcher and HealthCheck, then read how backend-list failures and retries are handled. Separate their responsibilities so backend fetching no longer delays health checks; done means health checks remain timely while backend discovery can run less frequently.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.