gRPC clients wait ~20 s on DNS for each connection when serverAddress is a short name
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go, grpc
- 領域
- backend, networking
調査の方向性
Start with the listed dials in core/internal/client/klioclient/grpcclient/connection.go:80 and core/cmd/admin/client.go:43, then trace the openGRPCAPIRepository dial in the Klio Kopia fork. Check how grpc-go's DNS resolver is configured and reproduce with a short serverAddress while watching CoreDNS logs. Done means short-name connections avoid the unused SRV and TXT lookups and connect without the DNS delay.
索引モデルが issue の本文から書いたものです。
説明
Description
When serverAddress is a short name (for example klio-local.default), each
gRPC dial to the Klio server waits about 20 s before it connects.
The grpc-go dns resolver does two DNS lookups that Klio does not use:
SRV _grpclb._tcp.<host>TXT _grpc_config.<host>
The pod has ndots:5, so these names do not match the cluster search domains.
CoreDNS sends them to the upstream DNS server. If the upstream server does not
answer, each lookup takes 10 s (5 s timeout, 2 attempts).
Kopia makes about 10 calls for each backup or restore. Because of this, a
32 MB backup takes 5 min 40 s. With the FQDN, the same backup takes 2 s.
This problem occurs in every environment where the upstream DNS is slow or
blocks SRV/TXT queries. One example is Docker Desktop 4.98.
Affected dials
- Kopia fork (
cloudnative-pg/kopia, branchklio):openGRPCAPIRepository.
This dial causes most of the delay. core/internal/client/klioclient/grpcclient/connection.go:80(WAL streaming
and WAL restore).core/cmd/admin/client.go:43.
How to reproduce
- Set
serverAddressto a short name, for exampleklio-local.default. - Make sure that the upstream DNS does not answer TXT or SRV queries.
- Run
kopia repository connect serverfrom theklio-plugincontainer. - Look at the CoreDNS logs. You see
SRV: ... i/o timeoutand
TXT: ... i/o timeoutfor the server name.
Expected result
A short serverAddress connects as fast as the FQDN. Klio does not depend on
upstream DNS answers for SRV or TXT records.
Workaround
- Use the FQDN as
serverAddressand add it to the SANs of the server
certificate. - Or set
GRPC_ENABLE_TXT_SERVICE_CONFIG=falsein the sidecar. This removes
half of the delay.
- 主要言語
- Go
- スター
- 39
- フォーク
- 10
- 平均マージ
- 19時間 58分
- マージ済み PR(30日)
- 175
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudnative-pg/klio のほかの issue
-
DLQ activity is not observable through metrics対応中かも @gabriele-wolfox が 1 日前に担当しました。 オープン
cloudnative-pg/klio#610 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Tier1 WAL retention can delete WALs not yet relayed to tier2対応中かも @gabriele-wolfox が 5 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cloudnative-pg/klio#578 ·
メンテナーはふだん 1 日以内に返信
-
Evaluate reuse of machinery's OpenTelemetry log export to complete native OTEL support (logs, metrics, traces)対応中かも @armru が 7 日前に担当しました。 オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
cloudnative-pg/klio#549 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Replace OLM catalog management対応中かも @jbattiato が 7 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
cloudnative-pg/klio#526 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
cloudnative-pg/klio#525 ·
メンテナーはふだん 1 日以内に返信
cloudnative-pg/klio の issue をすべて見る
似ている issue
-
GitHub webhook is not subscribed to release events, so `event: release` never triggers対応中かも @qsun が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
woodpecker-ci/woodpecker#7542 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
zilliztech/milvus-backup#1386 ·
メンテナーはふだん 1 日以内に返信
-
Pipelined flush no longer observes kill signals after #2042: flush backoffer is built with nil varsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
model:sonnet runtime:claude security size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
FootprintAI/Containarium#3624 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信