「Rescached」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎参照: == Integration with OpenResolv == と == Integration with OpenResolv == を追加(英語版より))
(関連記事を追加)
1行目: 1行目:
 
[[Category:Domain Name System]]
 
[[Category:Domain Name System]]
 
[[en:Rescached]]
 
[[en:Rescached]]
  +
{{Related articles start}}
  +
{{Related|ドメイン名前解決}}
  +
{{Related articles end}}
 
[https://github.com/shuLhan/rescached rescached] はインターネットの名前解決・アドレス解決をキャッシュするデーモンです。実行中はローカルメモリに保存し、実行していない間はディスクキャッシュに保存されます。
 
[https://github.com/shuLhan/rescached rescached] はインターネットの名前解決・アドレス解決をキャッシュするデーモンです。実行中はローカルメモリに保存し、実行していない間はディスクキャッシュに保存されます。
   

2021年7月25日 (日) 19:37時点における版

関連記事

rescached はインターネットの名前解決・アドレス解決をキャッシュするデーモンです。実行中はローカルメモリに保存し、実行していない間はディスクキャッシュに保存されます。

rescachedBIND などの DNS サーバーの再実装ではありません。rescached の目標はあくまで DNS クエリをキャッシュして外部ネットワークへの不必要なトラフィックを減らすことにあります。個人的・小規模な環境での使用が想定されています。

特徴

  • UDP と TCP によるリクエストを処理可能。
  • ディスクにキャッシュを保存・ロード。
  • /etc/hosts でアドレスとホストネームをロード・提供。

rescached のキャッシュの仕組み

メモリにおけるキャッシュの順番は使用頻度によって決まります。頻繁に問い合わせがされるホストネームはキャッシュリストの一番上になり、問い合わせが少ないホストネームはキャッシュリストの下に沈みます。ユーザーの習慣を元にキャッシュリストが作成され、解決速度が高速になります。

# ホスト名
529 www.reddit.com
233 www.google.com
... ...
1 www.kilabit.info

rescached で保存されるキャッシュエントリの数は設定ファイルの cache.max の値によって決まります。cache.max の上限に達すると、デーモンは cache.threshold に設定されている閾値よりもアクセスが少ないキャッシュエントリを全て削除します。

インストール

rescached-gitAUR パッケージをインストールしてください。

設定

デフォルトで設定でデーモンを直接起動できます。

Rescached の設定は /etc/rescached/rescached.cfg に存在します。以下のような設定があります:

  • 親の DNS サーバーの設定:
server.parent の値を使用したい DNS サーバーに変えてください。
  • キャッシュの最大値の設定:
cache.maxcache.threshold の値を必要に応じて変更してください。

設定ファイルを編集したら、resolv.conf ファイルを開いてリゾルバのアドレスを localhost のアドレスで置き換えてください:

nameserver 127.0.0.1

他のプログラムが設定を上書きしてしまうことがあります。詳しくは resolv.conf#DNS 設定の保護を見てください。

設定できたら rescached.service起動有効化してください。

Integration with OpenResolv

Rescached can detect change on "resolv.conf" file generated by resolvconf. To use this feature set the "file.resolvconf" to "/etc/rescached/resolv.conf" in configuration file. In "/etc/resolvconf.conf" set either "dnsmasq_resolv", "pdnsd_resolv", or "unbound_conf" to point to the same file "/etc/rescached/resolv.conf".

Web user interface

The rescached service provide a web user interface that can be accessed at http://127.0.0.1:5380. The following user interfaces are available on the latest release,

The front page allow user to monitor active caches, query the caches, and removing the caches.

The Environment page allow user to modify the rescached configuration on the fly.

The Hosts Blocks page allow user to enable or disable the external sources of hosts blocks list.

The Hosts.d page allow user to manage hosts file, creating new hosts file, create new record, or delete a record.

The Zone.d page allow user manage zone file, creating new zone file, adding or deleting new resource record in the zone file.

参照