2 # IP Virtual Server configuration
5 tristate "IP virtual server support"
6 depends on NET && INET && NETFILTER
8 IP Virtual Server support will let you build a high-performance
9 virtual server based on cluster of two or more real servers. This
10 option must be enabled for at least one of the clustered computers
11 that will take care of intercepting incoming connections to a
12 single IP address and scheduling them to real servers.
14 Three request dispatching techniques are implemented, they are
15 virtual server via NAT, virtual server via tunneling and virtual
16 server via direct routing. The several scheduling algorithms can
17 be used to choose which server the connection is directed to,
18 thus load balancing can be achieved among the servers. For more
19 information and its administration program, please visit the
20 following URL: <http://www.linuxvirtualserver.org/>.
22 If you want to compile it in kernel, say Y. To compile it as a
23 module, choose M here. If unsure, say N.
28 bool "IPv6 support for IPVS"
29 depends on EXPERIMENTAL && (IPV6 = y || IP_VS = IPV6)
31 Add IPv6 support to IPVS. This is incomplete and might be dangerous.
33 See http://www.mindbasket.com/ipvs for more information.
38 bool "IP virtual server debugging"
40 Say Y here if you want to get additional messages useful in
41 debugging the IP virtual server code. You can change the debug
42 level in /proc/sys/net/ipv4/vs/debug_level
45 int "IPVS connection table size (the Nth power of 2)"
49 The IPVS connection hash table uses the chaining scheme to handle
50 hash collisions. Using a big IPVS connection hash table will greatly
51 reduce conflicts when there are hundreds of thousands of connections
54 Note the table size must be power of 2. The table size will be the
55 value of 2 to the your input number power. The number to choose is
56 from 8 to 20, the default number is 12, which means the table size
57 is 4096. Don't input the number too small, otherwise you will lose
58 performance on it. You can adapt the table size yourself, according
59 to your virtual server application. It is good to set the table size
60 not far less than the number of connections per second multiplying
61 average lasting time of connection in the table. For example, your
62 virtual server gets 200 connections per second, the connection lasts
63 for 200 seconds in average in the connection table, the table size
64 should be not far less than 200x200, it is good to set the table
67 Another note that each connection occupies 128 bytes effectively and
68 each hash entry uses 8 bytes, so you can estimate how much memory is
71 You can overwrite this number setting conn_tab_bits module parameter
72 or by appending ip_vs.conn_tab_bits=? to the kernel command line
73 if IP VS was compiled built-in.
75 comment "IPVS transport protocol load balancing support"
77 config IP_VS_PROTO_TCP
78 bool "TCP load balancing support"
80 This option enables support for load balancing TCP transport
81 protocol. Say Y if unsure.
83 config IP_VS_PROTO_UDP
84 bool "UDP load balancing support"
86 This option enables support for load balancing UDP transport
87 protocol. Say Y if unsure.
89 config IP_VS_PROTO_AH_ESP
93 config IP_VS_PROTO_ESP
94 bool "ESP load balancing support"
95 select IP_VS_PROTO_AH_ESP
97 This option enables support for load balancing ESP (Encapsulation
98 Security Payload) transport protocol. Say Y if unsure.
100 config IP_VS_PROTO_AH
101 bool "AH load balancing support"
102 select IP_VS_PROTO_AH_ESP
104 This option enables support for load balancing AH (Authentication
105 Header) transport protocol. Say Y if unsure.
107 comment "IPVS scheduler"
110 tristate "round-robin scheduling"
112 The robin-robin scheduling algorithm simply directs network
113 connections to different real servers in a round-robin manner.
115 If you want to compile it in kernel, say Y. To compile it as a
116 module, choose M here. If unsure, say N.
119 tristate "weighted round-robin scheduling"
121 The weighted robin-robin scheduling algorithm directs network
122 connections to different real servers based on server weights
123 in a round-robin manner. Servers with higher weights receive
124 new connections first than those with less weights, and servers
125 with higher weights get more connections than those with less
126 weights and servers with equal weights get equal connections.
128 If you want to compile it in kernel, say Y. To compile it as a
129 module, choose M here. If unsure, say N.
132 tristate "least-connection scheduling"
134 The least-connection scheduling algorithm directs network
135 connections to the server with the least number of active
138 If you want to compile it in kernel, say Y. To compile it as a
139 module, choose M here. If unsure, say N.
142 tristate "weighted least-connection scheduling"
144 The weighted least-connection scheduling algorithm directs network
145 connections to the server with the least active connections
146 normalized by the server weight.
148 If you want to compile it in kernel, say Y. To compile it as a
149 module, choose M here. If unsure, say N.
152 tristate "locality-based least-connection scheduling"
154 The locality-based least-connection scheduling algorithm is for
155 destination IP load balancing. It is usually used in cache cluster.
156 This algorithm usually directs packet destined for an IP address to
157 its server if the server is alive and under load. If the server is
158 overloaded (its active connection numbers is larger than its weight)
159 and there is a server in its half load, then allocate the weighted
160 least-connection server to this IP address.
162 If you want to compile it in kernel, say Y. To compile it as a
163 module, choose M here. If unsure, say N.
166 tristate "locality-based least-connection with replication scheduling"
168 The locality-based least-connection with replication scheduling
169 algorithm is also for destination IP load balancing. It is
170 usually used in cache cluster. It differs from the LBLC scheduling
171 as follows: the load balancer maintains mappings from a target
172 to a set of server nodes that can serve the target. Requests for
173 a target are assigned to the least-connection node in the target's
174 server set. If all the node in the server set are over loaded,
175 it picks up a least-connection node in the cluster and adds it
176 in the sever set for the target. If the server set has not been
177 modified for the specified time, the most loaded node is removed
178 from the server set, in order to avoid high degree of replication.
180 If you want to compile it in kernel, say Y. To compile it as a
181 module, choose M here. If unsure, say N.
184 tristate "destination hashing scheduling"
186 The destination hashing scheduling algorithm assigns network
187 connections to the servers through looking up a statically assigned
188 hash table by their destination IP addresses.
190 If you want to compile it in kernel, say Y. To compile it as a
191 module, choose M here. If unsure, say N.
194 tristate "source hashing scheduling"
196 The source hashing scheduling algorithm assigns network
197 connections to the servers through looking up a statically assigned
198 hash table by their source IP addresses.
200 If you want to compile it in kernel, say Y. To compile it as a
201 module, choose M here. If unsure, say N.
204 tristate "shortest expected delay scheduling"
206 The shortest expected delay scheduling algorithm assigns network
207 connections to the server with the shortest expected delay. The
208 expected delay that the job will experience is (Ci + 1) / Ui if
209 sent to the ith server, in which Ci is the number of connections
210 on the ith server and Ui is the fixed service rate (weight)
213 If you want to compile it in kernel, say Y. To compile it as a
214 module, choose M here. If unsure, say N.
217 tristate "never queue scheduling"
219 The never queue scheduling algorithm adopts a two-speed model.
220 When there is an idle server available, the job will be sent to
221 the idle server, instead of waiting for a fast one. When there
222 is no idle server available, the job will be sent to the server
223 that minimize its expected delay (The Shortest Expected Delay
224 scheduling algorithm).
226 If you want to compile it in kernel, say Y. To compile it as a
227 module, choose M here. If unsure, say N.
229 comment 'IPVS application helper'
232 tristate "FTP protocol helper"
233 depends on IP_VS_PROTO_TCP
235 FTP is a protocol that transfers IP address and/or port number in
236 the payload. In the virtual server via Network Address Translation,
237 the IP address and port number of real servers cannot be sent to
238 clients in ftp connections directly, so FTP protocol helper is
239 required for tracking the connection and mangling it back to that of
242 If you want to compile it in kernel, say Y. To compile it as a
243 module, choose M here. If unsure, say N.