Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 6.2

(Zoot)

lvs.cf(5)


LVS.CF

LVS.CF

NAME
DESCRIPTION
GLOBAL OPTIONS
PER-VIRTUAL SERVER SECTION
PER-FAILOVER SERVICE SECTION
SEE ALSO

NAME

lvs.cf − configuration file for lvs

DESCRIPTION

This file is read and updated from a Web browser by the piranha configuration tool, which uses lvs(8) to actually work with the file.

GLOBAL OPTIONS

Global settings affect all aspects of the cluster, including virtual servers and real servers.
service = [lvs|fos]

Indicates which set of defined services are to be used. Virtual Servers and Failover Services as mutually exclusive; although they may both be defined in the same config file, thay cannot both be running simultaneously. This option specifies which section is to be used.

primary = a.b.c.d

This is the IP (or hostname) of the primary LVS machine.

backup = a.b.c.d

This is the IP (or hostname) of the backup (or failover) LVS machine.

heartbeat = [0|1]

Use heartbeat between the two LVS nodes.

keepalive = n

Number of seconds between heartbeats.

deadtime = n

Length of time before a node is declared dead and IP takeover occurs.

rsh_command =

The command family used to sync file systems and config files. Allowable options are either rsh (default) or ssh. The appropriate .rhosts (or made non-interactively.

Sync’ing of specified config files and directories will occur when lvs receives a SIGUSR1. lvs.cf(5) is automatically synced between the LVS nodes anytime it is written to.

network = [direct|nat|tunnel]

The lvs virtual server can reroute all of its incoming traffic via one of three methods; NAT (Network Address Translation), Direct Routing, or Tunneling (IP Encapsulation).

PER-VIRTUAL SERVER SECTION

A per-virtual server section starts with

virtual server-name {

}

where the string is a unique server identifier. This doesn’t have to match up to a FQDN.

The following items are required for each virtual server entry in the config file.
address = a.b.c.d

This is the address to be used for the virtual server.

active = [0|1]

This flag is used to indicate whether or not this particular virtual server is active. If it is marked inactive, then all real servers being routed to by it will by default become inactive as well.

The following items are all optional entries (note the default values for many).

load_monitor = [uptime|rup|ruptime]

This specifies the method that the LVS can acquire CPU load information from the real servers. This load information is used to adjust the weighting factor for each server entry in the LVS routing table. Each method requires slightly different configurations to be present on the real servers and on the LVS nodes. The default method is uptime.

timeout =

This is the amount of time allowed before a presumed dead real server is removed from the LVS routing table. Default is 10 seconds.

reentry =

This is the amount of time that a previously dead real server must be alive before the LVS will re-enter it into the routing table. The purpose of this delay is to prevent troubled machines from causing a "ping-pong" effect. The default is 180 seconds.

port = xx

This is the port that the virtual server is instructed to listen to and redirect network requests from. The default is port 80 (http).

send = xxx

If present, the specified text ("xxx") will be sent to the port of the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \r, \\, or \’". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted.

expect = xxx

If present, the specified text ("xxx") will be expected as a response from the port on the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \r, \\, or \’". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted.

persistent =

The number of seconds that a connection between this virtual server and a real server will persist. If a request is received from a client within this number of seconds, it will be assigned to the same real server that processed a prior request. If this parameter is missing or set to zero, connections with this virtual server are not persistent.

pmask =

The network mask to apply to persistence if enabled. Default is 255.255.255.255.

scheduler = [rr|lc|wlc|wrr]

This is the key part of the LVS router. These methods of scheduling how incoming requests are routed are built as loadable kernel modules: Round Robin (rr), least-connections (lc), Weighted Least Connections (wlc, the default) and Weighted Round Robin (wrr).

REAL SERVER SECTIONS
A per-real server section starts with

real server name {

}

where the string is a unique server identifier. This doesn’t have to match up to any real FQDN.

The following items are required for each real server entry in the config file.
address = a.b.c.d

This is the actual IP address being used by the real server. In the cases of NAT type routing, it is generally one of the reserved, private IPs.

active = [0|1]

This flag is used to indicate whether or not this particular real server is active.

The following item is optional.

weight =

This option enforces a skew affect by enabling more loading on a particular server. The weights of all real servers influence the scheduling algorithm and a higher weight will load a particular server down with more redirects. The default value is 1.

An example real server entry might look like:

server 1 {
address = 192.168.10.2
active = 1
weight = 1

}

PER-FAILOVER SERVICE SECTION

A per-failover-service section starts with

failover service-name {
}

where the service-name is a unique identifier.

The following items are required for each failover service entry in the config file.
address = a.b.c.d dev:x

This is the address and device interface to be used for the virtual service.

active = [0|1]

This flag is used to indicate whether or not this particular virtual server is active. If it is marked inactive, then all real servers being routed to by it will by default become inactive as well.

The following items are all optional entries (note the default values for many).

timeout =

This is the amount of time allowed before a service is presumed dead and will cause a failover.

reentry =

This is the amount of time that a previously dead partner system must be alive before it will be a candidate for possible failover. The purpose of this delay is to prevent troubled machines from causing a "ping-pong" effect. The default is 180 seconds.

port = xx

This is the port that the failover service is instructed to test. The default is port 80 (http).

send = xxx

If present, the specified text ("xxx") will be sent to the port of the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \r, \\, or \’". Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted.

expect = xxx

If present, the specified text ("xxx") will be expected as a response from the port on the virtual server as part of the test for whether the service is operational. The text is limited to 255 characters maximum. Characters must be printable/quotable, and may contain "\n, \r, \\, or \’". Expect can also be a single ’*’ character to indicate any response characters are allowed. Note that if both "send" and "expect" are specified, the send will always execute before the read for the expect is attempted.

start_cmd = xxx

Mandatory; specifies the startup command/script to execute to start the failover service. Options can be specified, but must be separated by a single space.

stop_cmd = xxx

Mandatory; specifies the shutdown command/script to execute to stop the failover service. Options can be specified, but must be separated by a single space.

SEE ALSO

ipvsadm(8), lvs(8), fos(8), pulse(8). sample.cf file
http://www.linuxvirtualserver.org



lvs.cf(5)