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
Layer 3 redirection happens at the packet level; to configure it,
relayd communicates with
relayd to properly set up
rules, the following line is required in the filter section of
Layer 7 relaying happens at the application level and is handled
relayd itself. Various application level
filtering and protocol-specific load-balancing options are available for
relayd works in terms of the
relays, protocols, redirections, and tables. A
represents a layer 7 load-balancing instance. Each instance translates to a
listening TCP or UDP port. A
defines which actions, if any, are taken on the packet payload as data
crosses a relay. A
represents a layer 3 load-balancing instance. Each instance translates to a
rdr-to rule being added. A
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
table containing only those hosts which are up.
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.
The options are as follows:
- Define macro to be set to value on the command line. Overrides the definition of macro in the configuration file.
- Do not daemonize. If this option is specified,
relaydwill run in the foreground and log to stderr.
- Specify an alternative configuration file. The default is /etc/relayd.conf.
- Configtest mode. Only check the configuration file for validity.
- Produce more verbose output.
- Default configuration file.
- UNIX-domain socket used for communication with relayctl(8).
relayd program, formerly known as
hoststated, first appeared in
OpenBSD 4.1. It was renamed to
relayd in OpenBSD 4.3.
relayd program was written by