pingcap / pingcap/tidb-operator

There are too many DNS queries if a TiKV pod can't started

Open
#3,108 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/help-wanted type/bug
Dominant language
Go
Stars
1.3k
Forks
540
Avg merge
3d 2h
Merged PRs (30d)
18

Description

I deployed a tidb cluster with 3xpd, 3xtikv and 2 tidb. We create 1000 tables.

When i killed a tikv pod, other tikv pods will query tikv-2 many times, for example, 100 queries per second. Two tikv pods as 200 queries per second.

Because the /etc/resolv.conf file has search section:

image

So a failed dns query will be 8 times, so the total DNS queries will be 8 x 200 = 1600 queries per second.

image

Well, I think there are two methods to optimize:

  1. For TiDB Operator, let’s see if we can reduce(or remove) the search item in the /etc/resolv.conf file so that the enlargement can be removed;
  2. TiKV should optimize the backoff mechanism to reduce the DNS queries.

What do you think? @cofyc @DanielZhangQD @lichunzhu

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

Start by reproducing the reported 3 PD, 3 TiKV, 2 TiDB deployment with 1,000 tables, then inspect /etc/resolv.conf and DNS traffic after a TiKV pod is killed. Compare whether the excessive queries originate in TiDB Operator's Kubernetes configuration or TiKV's backoff behavior; the work is done when the chosen cause and an objectively reduced query rate are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.