xref: /linux-6.15/net/netfilter/ipvs/Kconfig (revision 63dca2c0)
1#
2# IP Virtual Server configuration
3#
4menuconfig IP_VS
5	tristate "IP virtual server support"
6	depends on NET && INET && NETFILTER
7	depends on (NF_CONNTRACK || NF_CONNTRACK=n)
8	---help---
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.
14
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/>.
22
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.
25
26if IP_VS
27
28config	IP_VS_IPV6
29	bool "IPv6 support for IPVS"
30	depends on IPV6 = y || IP_VS = IPV6
31	select IP6_NF_IPTABLES
32	---help---
33	  Add IPv6 support to IPVS. This is incomplete and might be dangerous.
34
35	  See http://www.mindbasket.com/ipvs for more information.
36
37	  Say N if unsure.
38
39config	IP_VS_DEBUG
40	bool "IP virtual server debugging"
41	---help---
42	  Say Y here if you want to get additional messages useful in
43	  debugging the IP virtual server code. You can change the debug
44	  level in /proc/sys/net/ipv4/vs/debug_level
45
46config	IP_VS_TAB_BITS
47	int "IPVS connection table size (the Nth power of 2)"
48	range 8 20
49	default 12
50	---help---
51	  The IPVS connection hash table uses the chaining scheme to handle
52	  hash collisions. Using a big IPVS connection hash table will greatly
53	  reduce conflicts when there are hundreds of thousands of connections
54	  in the hash table.
55
56	  Note the table size must be power of 2. The table size will be the
57	  value of 2 to the your input number power. The number to choose is
58	  from 8 to 20, the default number is 12, which means the table size
59	  is 4096. Don't input the number too small, otherwise you will lose
60	  performance on it. You can adapt the table size yourself, according
61	  to your virtual server application. It is good to set the table size
62	  not far less than the number of connections per second multiplying
63	  average lasting time of connection in the table.  For example, your
64	  virtual server gets 200 connections per second, the connection lasts
65	  for 200 seconds in average in the connection table, the table size
66	  should be not far less than 200x200, it is good to set the table
67	  size 32768 (2**15).
68
69	  Another note that each connection occupies 128 bytes effectively and
70	  each hash entry uses 8 bytes, so you can estimate how much memory is
71	  needed for your box.
72
73	  You can overwrite this number setting conn_tab_bits module parameter
74	  or by appending ip_vs.conn_tab_bits=? to the kernel command line
75	  if IP VS was compiled built-in.
76
77comment "IPVS transport protocol load balancing support"
78
79config	IP_VS_PROTO_TCP
80	bool "TCP load balancing support"
81	---help---
82	  This option enables support for load balancing TCP transport
83	  protocol. Say Y if unsure.
84
85config	IP_VS_PROTO_UDP
86	bool "UDP load balancing support"
87	---help---
88	  This option enables support for load balancing UDP transport
89	  protocol. Say Y if unsure.
90
91config	IP_VS_PROTO_AH_ESP
92	def_bool IP_VS_PROTO_ESP || IP_VS_PROTO_AH
93
94config	IP_VS_PROTO_ESP
95	bool "ESP load balancing support"
96	---help---
97	  This option enables support for load balancing ESP (Encapsulation
98	  Security Payload) transport protocol. Say Y if unsure.
99
100config	IP_VS_PROTO_AH
101	bool "AH load balancing support"
102	---help---
103	  This option enables support for load balancing AH (Authentication
104	  Header) transport protocol. Say Y if unsure.
105
106config  IP_VS_PROTO_SCTP
107	bool "SCTP load balancing support"
108	select LIBCRC32C
109	---help---
110	  This option enables support for load balancing SCTP transport
111	  protocol. Say Y if unsure.
112
113comment "IPVS scheduler"
114
115config	IP_VS_RR
116	tristate "round-robin scheduling"
117	---help---
118	  The robin-robin scheduling algorithm simply directs network
119	  connections to different real servers in a round-robin manner.
120
121	  If you want to compile it in kernel, say Y. To compile it as a
122	  module, choose M here. If unsure, say N.
123
124config	IP_VS_WRR
125	tristate "weighted round-robin scheduling"
126	---help---
127	  The weighted robin-robin scheduling algorithm directs network
128	  connections to different real servers based on server weights
129	  in a round-robin manner. Servers with higher weights receive
130	  new connections first than those with less weights, and servers
131	  with higher weights get more connections than those with less
132	  weights and servers with equal weights get equal connections.
133
134	  If you want to compile it in kernel, say Y. To compile it as a
135	  module, choose M here. If unsure, say N.
136
137config	IP_VS_LC
138        tristate "least-connection scheduling"
139	---help---
140	  The least-connection scheduling algorithm directs network
141	  connections to the server with the least number of active
142	  connections.
143
144	  If you want to compile it in kernel, say Y. To compile it as a
145	  module, choose M here. If unsure, say N.
146
147config	IP_VS_WLC
148        tristate "weighted least-connection scheduling"
149	---help---
150	  The weighted least-connection scheduling algorithm directs network
151	  connections to the server with the least active connections
152	  normalized by the server weight.
153
154	  If you want to compile it in kernel, say Y. To compile it as a
155	  module, choose M here. If unsure, say N.
156
157config	IP_VS_LBLC
158	tristate "locality-based least-connection scheduling"
159	---help---
160	  The locality-based least-connection scheduling algorithm is for
161	  destination IP load balancing. It is usually used in cache cluster.
162	  This algorithm usually directs packet destined for an IP address to
163	  its server if the server is alive and under load. If the server is
164	  overloaded (its active connection numbers is larger than its weight)
165	  and there is a server in its half load, then allocate the weighted
166	  least-connection server to this IP address.
167
168	  If you want to compile it in kernel, say Y. To compile it as a
169	  module, choose M here. If unsure, say N.
170
171config  IP_VS_LBLCR
172	tristate "locality-based least-connection with replication scheduling"
173	---help---
174	  The locality-based least-connection with replication scheduling
175	  algorithm is also for destination IP load balancing. It is
176	  usually used in cache cluster. It differs from the LBLC scheduling
177	  as follows: the load balancer maintains mappings from a target
178	  to a set of server nodes that can serve the target. Requests for
179	  a target are assigned to the least-connection node in the target's
180	  server set. If all the node in the server set are over loaded,
181	  it picks up a least-connection node in the cluster and adds it
182	  in the sever set for the target. If the server set has not been
183	  modified for the specified time, the most loaded node is removed
184	  from the server set, in order to avoid high degree of replication.
185
186	  If you want to compile it in kernel, say Y. To compile it as a
187	  module, choose M here. If unsure, say N.
188
189config	IP_VS_DH
190	tristate "destination hashing scheduling"
191	---help---
192	  The destination hashing scheduling algorithm assigns network
193	  connections to the servers through looking up a statically assigned
194	  hash table by their destination IP addresses.
195
196	  If you want to compile it in kernel, say Y. To compile it as a
197	  module, choose M here. If unsure, say N.
198
199config	IP_VS_SH
200	tristate "source hashing scheduling"
201	---help---
202	  The source hashing scheduling algorithm assigns network
203	  connections to the servers through looking up a statically assigned
204	  hash table by their source IP addresses.
205
206	  If you want to compile it in kernel, say Y. To compile it as a
207	  module, choose M here. If unsure, say N.
208
209config	IP_VS_SED
210	tristate "shortest expected delay scheduling"
211	---help---
212	  The shortest expected delay scheduling algorithm assigns network
213	  connections to the server with the shortest expected delay. The
214	  expected delay that the job will experience is (Ci + 1) / Ui if
215	  sent to the ith server, in which Ci is the number of connections
216	  on the ith server and Ui is the fixed service rate (weight)
217	  of the ith server.
218
219	  If you want to compile it in kernel, say Y. To compile it as a
220	  module, choose M here. If unsure, say N.
221
222config	IP_VS_NQ
223	tristate "never queue scheduling"
224	---help---
225	  The never queue scheduling algorithm adopts a two-speed model.
226	  When there is an idle server available, the job will be sent to
227	  the idle server, instead of waiting for a fast one. When there
228	  is no idle server available, the job will be sent to the server
229	  that minimize its expected delay (The Shortest Expected Delay
230	  scheduling algorithm).
231
232	  If you want to compile it in kernel, say Y. To compile it as a
233	  module, choose M here. If unsure, say N.
234
235comment 'IPVS SH scheduler'
236
237config IP_VS_SH_TAB_BITS
238	int "IPVS source hashing table size (the Nth power of 2)"
239	range 4 20
240	default 8
241	---help---
242	  The source hashing scheduler maps source IPs to destinations
243	  stored in a hash table. This table is tiled by each destination
244	  until all slots in the table are filled. When using weights to
245	  allow destinations to receive more connections, the table is
246	  tiled an amount proportional to the weights specified. The table
247	  needs to be large enough to effectively fit all the destinations
248	  multiplied by their respective weights.
249
250comment 'IPVS application helper'
251
252config	IP_VS_FTP
253  	tristate "FTP protocol helper"
254	depends on IP_VS_PROTO_TCP && NF_CONNTRACK && NF_NAT && \
255		NF_CONNTRACK_FTP
256	select IP_VS_NFCT
257	---help---
258	  FTP is a protocol that transfers IP address and/or port number in
259	  the payload. In the virtual server via Network Address Translation,
260	  the IP address and port number of real servers cannot be sent to
261	  clients in ftp connections directly, so FTP protocol helper is
262	  required for tracking the connection and mangling it back to that of
263	  virtual service.
264
265	  If you want to compile it in kernel, say Y. To compile it as a
266	  module, choose M here. If unsure, say N.
267
268config	IP_VS_NFCT
269	bool "Netfilter connection tracking"
270	depends on NF_CONNTRACK
271	---help---
272	  The Netfilter connection tracking support allows the IPVS
273	  connection state to be exported to the Netfilter framework
274	  for filtering purposes.
275
276config	IP_VS_PE_SIP
277	tristate "SIP persistence engine"
278        depends on IP_VS_PROTO_UDP
279	depends on NF_CONNTRACK_SIP
280	---help---
281	  Allow persistence based on the SIP Call-ID
282
283endif # IP_VS
284