relayd - relay daemon†
relayd [-dnv] [-D macro=value] [-f file]
- relayd is a daemon to relay and dynamically redirect incoming connections to a target host.Its main purposes are to run as a load-balancer, application layer gateway, or transparent proxy.The daemon is able to monitor groups of hosts for availability, which is determined by checking for a specific service common to a host group.When availability is confirmed, layer 3 and/or layer 7 forwarding services are set up by relayd.
- relayd は動的にターゲットホストへの着信接続をリダイレクト,リレーをするデーモンです.主な目的として,ロードバランサ,アプリケーションレイヤゲートウェイ,または透過プロキシとして動作します.デーモンは,可用性の為にホストグループを監視する事が可能で,これは,ホストグループに共通する特定のサービスをチェックする事で決定されます.可用性が確認されれば,relayd によりレイヤ3 (および/または) レイヤ7 のフォワーディングサービスが設定されます.
- Layer 3 redirection happens at the packet level; to configure it, relayd communicates with pf(4). To allow relayd to properly set up pf(4) rules,the following line is required in the filter section of pf.conf(5):
- レイヤ3リダイレクションは,パケット・レベルで実行されます; それを設定する為,relayd は pf(4) と通信します.適切に relayd が動作する事為には pf(4) のルールを設定する事が必要です.次の行が,pf.conf(5) のフィルタセクションに必要となります.
anchor "relayd/*"
- Layer 7 relaying happens at the application level and is handled by relayd itself. Various application level filtering and protocol-specific load-balancing options are available for relays.
- レイヤ7の中継はアプリケーションレベルで起こり,relayd 自身によって処理されます.
様々なアプリケーションレベルのフィルタリングやプロトコル固有のロードバランシングオプションを中継の為に利用する事が出来ます.
- relayd works in terms of the following entities: relays, protocols, redirections, and tables. A relay represents a layer 7 load-balancing instance. Each instance translates to a listening TCP or UDP port. A protocol defines which actions, if any, are taken on the packet payload as data crosses a relay. A redirection represents a layer 3 load-balancing instance. Each instance translates to a pf(4) rdr-to rule being added. A table represents a group of hosts which can be checked for availability using the same method. Each table contains at least one host. If a table is used in a layer 3 load-balancing instance, it will be mapped to a pf(4) table containing only those hosts which are up.
- relayd は次のエンティティの条件で動作します: リレー,プロトコル,リダイレクションおよびテーブル.リレーはレイヤ7ロードバランシングインスタンスを表します.各インスタンスは,リスニングしている TCP ポートまたは UDP ポートに変換されます.データがリレーを通過する際,このプロトコルはどの様なアクションがパケットのペイロードで取られるかを定義します.リダイレクションはレイヤ3ロードバランシングインスタンスを表します.各インスタンスは pf(4) の rdr-to に変換されて追加されます.テーブルには,同じ方法を使用して可用性を保つホストのグループを定義します.各テーブルには少なくとも1つのホストが含まれていなくてはなりません.テーブルは,レイヤ3ロードバランシングインスタンスで使用されている場合,稼働しているホストのみが pf(4) のテーブルにマップされます.
- All these entities can be configured in relayd.conf(5), and relayctl(8) can be used to alter or report on the status of each entity.
- これらすべてのエンティティは relayd.conf(5) で設定する事が可能で,relayctl(8) は修正(変更)または各エンティティの状態をレポートする為に使う事が出来ます.
- The options are as follows:
-D macro=value
- Define macro to be set to value on the command line. Overrides the definition of macro in the configuration file.
- コマンドラインで値を設定する為マクロを定義できます.設定ファイル内のマクロ定義は上書きされます.
-d
- Do not daemonize. If this option is specified, relayd will run in the foreground and log to stderr.
- デーモン化しません.このオプションが指定されている場合,relayd はフォアグラウンドで実行され,標準エラー出力(stderr)にログを出力します.
-f file
- Specify an alternative configuration file. The default is /etc/relayd.conf.
- 別の設定ファイルを指定します.デフォルトは /etc/relayd.conf です.
-n
- Configtest mode. Only check the configuration file for validity.
- 設定確認モード.設定の有効性の確認のみを行います.
-v
- Produce more verbose output.
ファイル†
/etc/relayd.conf デフォルトの設定ファイル
/var/run/relayd.sock relayctl(8) との通信で使用する UNIX ドメインソケット
relayd.conf(5), relayctl(8)
オリジナルドキュメント†
http://www.openbsd.org/cgi-bin/man.cgi?query=relayd&sektion=8&format=html
Hiroyuki Seino http://www.seichan.org/ http://www.seichan.org/blog/
Today:1 Yesterday:1 All:2735