Gateway: ensure consistent caching of DNS records

オープン
#480 コメント 4 件 リアクション 1 件 担当者 1 名 GitHub で見る

@hsanjuan がすでに取り組んでいます。

2023年10月6日 から。

評価

この issue はまだ評価されていません。

説明

dif/easy effort/hours kind/bug P2

The gateway code uses https://github.com/multiformats/go-multiaddr-dns which by default would use net.DefaultResolver and not cache anything. It also registers two default resolvers for .eth and .crypto. In this case using DoH urls for which it uses https://github.com/libp2p/go-doh-resolver, which does include caching of results.

This means some dns results are going to be cached while others depend on what DNS resolver Go is actually using (which depends on CGO iirc). When not using CGO, Go would use its own resolver and not cache anything. When using CGO, go would use the system's resolver which may or not cache stuff depending what is on the system.

Is my understanding correct @lidel ?

Ideally we should be caching all results. This has been used before in the ecosystem: https://github.com/rs/dnscache

主要言語
Go
スター
326
フォーク
165
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ipfs/boxo のほかの issue

ipfs/boxo の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。