2 # IP Virtual Server configuration
5 tristate "IP virtual server support"
6 depends on NET && INET && NETFILTER
7 depends on (NF_CONNTRACK || NF_CONNTRACK=n)
9 IP Virtual Server support will let you build a high-performance
10 virtual server based on cluster of two or more real servers. This
11 option must be enabled for at least one of the clustered computers
12 that will take care of intercepting incoming connections to a
13 single IP address and scheduling them to real servers.
15 Three request dispatching techniques are implemented, they are
16 virtual server via NAT, virtual server via tunneling and virtual
17 server via direct routing. The several scheduling algorithms can
18 be used to choose which server the connection is directed to,
19 thus load balancing can be achieved among the servers. For more
20 information and its administration program, please visit the
21 following URL: <http://www.linuxvirtualserver.org/>.
23 If you want to compile it in kernel, say Y. To compile it as a
24 module, choose M here. If unsure, say N.
29 bool "IPv6 support for IPVS"
30 depends on IPV6 = y || IP_VS = IPV6
31 select IP6_NF_IPTABLES
33 Add IPv6 support to IPVS.
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
90 def_bool IP_VS_PROTO_ESP || IP_VS_PROTO_AH
92 config IP_VS_PROTO_ESP
93 bool "ESP load balancing support"
95 This option enables support for load balancing ESP (Encapsulation
96 Security Payload) transport protocol. Say Y if unsure.
99 bool "AH load balancing support"
101 This option enables support for load balancing AH (Authentication
102 Header) transport protocol. Say Y if unsure.
104 config IP_VS_PROTO_SCTP
105 bool "SCTP load balancing support"
108 This option enables support for load balancing SCTP transport
109 protocol. Say Y if unsure.
111 comment "IPVS scheduler"
114 tristate "round-robin scheduling"
116 The robin-robin scheduling algorithm simply directs network
117 connections to different real servers in a round-robin manner.
119 If you want to compile it in kernel, say Y. To compile it as a
120 module, choose M here. If unsure, say N.
123 tristate "weighted round-robin scheduling"
125 The weighted robin-robin scheduling algorithm directs network
126 connections to different real servers based on server weights
127 in a round-robin manner. Servers with higher weights receive
128 new connections first than those with less weights, and servers
129 with higher weights get more connections than those with less
130 weights and servers with equal weights get equal connections.
132 If you want to compile it in kernel, say Y. To compile it as a
133 module, choose M here. If unsure, say N.
136 tristate "least-connection scheduling"
138 The least-connection scheduling algorithm directs network
139 connections to the server with the least number of active
142 If you want to compile it in kernel, say Y. To compile it as a
143 module, choose M here. If unsure, say N.
146 tristate "weighted least-connection scheduling"
148 The weighted least-connection scheduling algorithm directs network
149 connections to the server with the least active connections
150 normalized by the server weight.
152 If you want to compile it in kernel, say Y. To compile it as a
153 module, choose M here. If unsure, say N.
156 tristate "weighted failover scheduling"
158 The weighted failover scheduling algorithm directs network
159 connections to the server with the highest weight that is
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 "weighted overflow scheduling"
168 The weighted overflow scheduling algorithm directs network
169 connections to the server with the highest weight that is
170 currently available and overflows to the next when active
171 connections exceed the node's weight.
173 If you want to compile it in kernel, say Y. To compile it as a
174 module, choose M here. If unsure, say N.
177 tristate "locality-based least-connection scheduling"
179 The locality-based least-connection scheduling algorithm is for
180 destination IP load balancing. It is usually used in cache cluster.
181 This algorithm usually directs packet destined for an IP address to
182 its server if the server is alive and under load. If the server is
183 overloaded (its active connection numbers is larger than its weight)
184 and there is a server in its half load, then allocate the weighted
185 least-connection server to this IP address.
187 If you want to compile it in kernel, say Y. To compile it as a
188 module, choose M here. If unsure, say N.
191 tristate "locality-based least-connection with replication scheduling"
193 The locality-based least-connection with replication scheduling
194 algorithm is also for destination IP load balancing. It is
195 usually used in cache cluster. It differs from the LBLC scheduling
196 as follows: the load balancer maintains mappings from a target
197 to a set of server nodes that can serve the target. Requests for
198 a target are assigned to the least-connection node in the target's
199 server set. If all the node in the server set are over loaded,
200 it picks up a least-connection node in the cluster and adds it
201 in the sever set for the target. If the server set has not been
202 modified for the specified time, the most loaded node is removed
203 from the server set, in order to avoid high degree of replication.
205 If you want to compile it in kernel, say Y. To compile it as a
206 module, choose M here. If unsure, say N.
209 tristate "destination hashing scheduling"
211 The destination hashing scheduling algorithm assigns network
212 connections to the servers through looking up a statically assigned
213 hash table by their destination IP addresses.
215 If you want to compile it in kernel, say Y. To compile it as a
216 module, choose M here. If unsure, say N.
219 tristate "source hashing scheduling"
221 The source hashing scheduling algorithm assigns network
222 connections to the servers through looking up a statically assigned
223 hash table by their source IP addresses.
225 If you want to compile it in kernel, say Y. To compile it as a
226 module, choose M here. If unsure, say N.
229 tristate "maglev hashing scheduling"
231 The maglev consistent hashing scheduling algorithm provides the
232 Google's Maglev hashing algorithm as a IPVS scheduler. It assigns
233 network connections to the servers through looking up a statically
234 assigned special hash table called the lookup table. Maglev hashing
235 is to assign a preference list of all the lookup table positions
238 Through this operation, The maglev hashing gives an almost equal
239 share of the lookup table to each of the destinations and provides
240 minimal disruption by using the lookup table. When the set of
241 destinations changes, a connection will likely be sent to the same
242 destination as it was before.
244 If you want to compile it in kernel, say Y. To compile it as a
245 module, choose M here. If unsure, say N.
248 tristate "shortest expected delay scheduling"
250 The shortest expected delay scheduling algorithm assigns network
251 connections to the server with the shortest expected delay. The
252 expected delay that the job will experience is (Ci + 1) / Ui if
253 sent to the ith server, in which Ci is the number of connections
254 on the ith server and Ui is the fixed service rate (weight)
257 If you want to compile it in kernel, say Y. To compile it as a
258 module, choose M here. If unsure, say N.
261 tristate "never queue scheduling"
263 The never queue scheduling algorithm adopts a two-speed model.
264 When there is an idle server available, the job will be sent to
265 the idle server, instead of waiting for a fast one. When there
266 is no idle server available, the job will be sent to the server
267 that minimize its expected delay (The Shortest Expected Delay
268 scheduling algorithm).
270 If you want to compile it in kernel, say Y. To compile it as a
271 module, choose M here. If unsure, say N.
273 comment 'IPVS SH scheduler'
275 config IP_VS_SH_TAB_BITS
276 int "IPVS source hashing table size (the Nth power of 2)"
280 The source hashing scheduler maps source IPs to destinations
281 stored in a hash table. This table is tiled by each destination
282 until all slots in the table are filled. When using weights to
283 allow destinations to receive more connections, the table is
284 tiled an amount proportional to the weights specified. The table
285 needs to be large enough to effectively fit all the destinations
286 multiplied by their respective weights.
288 comment 'IPVS MH scheduler'
290 config IP_VS_MH_TAB_INDEX
291 int "IPVS maglev hashing table index of size (the prime numbers)"
295 The maglev hashing scheduler maps source IPs to destinations
296 stored in a hash table. This table is assigned by a preference
297 list of the positions to each destination until all slots in
298 the table are filled. The index determines the prime for size of
299 the table as 251, 509, 1021, 2039, 4093, 8191, 16381, 32749,
300 65521 or 131071. When using weights to allow destinations to
301 receive more connections, the table is assigned an amount
302 proportional to the weights specified. The table needs to be large
303 enough to effectively fit all the destinations multiplied by their
306 comment 'IPVS application helper'
309 tristate "FTP protocol helper"
310 depends on IP_VS_PROTO_TCP && NF_CONNTRACK && NF_NAT && \
314 FTP is a protocol that transfers IP address and/or port number in
315 the payload. In the virtual server via Network Address Translation,
316 the IP address and port number of real servers cannot be sent to
317 clients in ftp connections directly, so FTP protocol helper is
318 required for tracking the connection and mangling it back to that of
321 If you want to compile it in kernel, say Y. To compile it as a
322 module, choose M here. If unsure, say N.
325 bool "Netfilter connection tracking"
326 depends on NF_CONNTRACK
328 The Netfilter connection tracking support allows the IPVS
329 connection state to be exported to the Netfilter framework
330 for filtering purposes.
333 tristate "SIP persistence engine"
334 depends on IP_VS_PROTO_UDP
335 depends on NF_CONNTRACK_SIP
337 Allow persistence based on the SIP Call-ID