| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | # | 
|  | 2 | # IP Virtual Server configuration | 
|  | 3 | # | 
| Jan Engelhardt | a6938a1 | 2007-05-23 14:48:10 -0700 | [diff] [blame] | 4 | menuconfig IP_VS | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | tristate "IP virtual server support (EXPERIMENTAL)" | 
| Sam Ravnborg | 6a2e9b7 | 2005-07-11 21:13:56 -0700 | [diff] [blame] | 6 | depends on NETFILTER | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | ---help--- | 
|  | 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. | 
|  | 13 |  | 
|  | 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/>. | 
|  | 21 |  | 
|  | 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. | 
|  | 24 |  | 
| Jan Engelhardt | a6938a1 | 2007-05-23 14:48:10 -0700 | [diff] [blame] | 25 | if IP_VS | 
|  | 26 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | config	IP_VS_DEBUG | 
|  | 28 | bool "IP virtual server debugging" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | ---help--- | 
|  | 30 | Say Y here if you want to get additional messages useful in | 
|  | 31 | debugging the IP virtual server code. You can change the debug | 
|  | 32 | level in /proc/sys/net/ipv4/vs/debug_level | 
|  | 33 |  | 
|  | 34 | config	IP_VS_TAB_BITS | 
|  | 35 | int "IPVS connection table size (the Nth power of 2)" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | default "12" | 
|  | 37 | ---help--- | 
|  | 38 | The IPVS connection hash table uses the chaining scheme to handle | 
|  | 39 | hash collisions. Using a big IPVS connection hash table will greatly | 
|  | 40 | reduce conflicts when there are hundreds of thousands of connections | 
|  | 41 | in the hash table. | 
|  | 42 |  | 
|  | 43 | Note the table size must be power of 2. The table size will be the | 
|  | 44 | value of 2 to the your input number power. The number to choose is | 
|  | 45 | from 8 to 20, the default number is 12, which means the table size | 
|  | 46 | is 4096. Don't input the number too small, otherwise you will lose | 
|  | 47 | performance on it. You can adapt the table size yourself, according | 
|  | 48 | to your virtual server application. It is good to set the table size | 
|  | 49 | not far less than the number of connections per second multiplying | 
|  | 50 | average lasting time of connection in the table.  For example, your | 
|  | 51 | virtual server gets 200 connections per second, the connection lasts | 
|  | 52 | for 200 seconds in average in the connection table, the table size | 
|  | 53 | should be not far less than 200x200, it is good to set the table | 
|  | 54 | size 32768 (2**15). | 
|  | 55 |  | 
|  | 56 | Another note that each connection occupies 128 bytes effectively and | 
|  | 57 | each hash entry uses 8 bytes, so you can estimate how much memory is | 
|  | 58 | needed for your box. | 
|  | 59 |  | 
|  | 60 | comment "IPVS transport protocol load balancing support" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 |  | 
|  | 62 | config	IP_VS_PROTO_TCP | 
|  | 63 | bool "TCP load balancing support" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | ---help--- | 
|  | 65 | This option enables support for load balancing TCP transport | 
|  | 66 | protocol. Say Y if unsure. | 
|  | 67 |  | 
|  | 68 | config	IP_VS_PROTO_UDP | 
|  | 69 | bool "UDP load balancing support" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | ---help--- | 
|  | 71 | This option enables support for load balancing UDP transport | 
|  | 72 | protocol. Say Y if unsure. | 
|  | 73 |  | 
|  | 74 | config	IP_VS_PROTO_ESP | 
|  | 75 | bool "ESP load balancing support" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 76 | ---help--- | 
| Matt LaPlante | 44c0920 | 2006-10-03 22:34:14 +0200 | [diff] [blame] | 77 | This option enables support for load balancing ESP (Encapsulation | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 78 | Security Payload) transport protocol. Say Y if unsure. | 
|  | 79 |  | 
|  | 80 | config	IP_VS_PROTO_AH | 
|  | 81 | bool "AH load balancing support" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | ---help--- | 
|  | 83 | This option enables support for load balancing AH (Authentication | 
|  | 84 | Header) transport protocol. Say Y if unsure. | 
|  | 85 |  | 
|  | 86 | comment "IPVS scheduler" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 87 |  | 
|  | 88 | config	IP_VS_RR | 
|  | 89 | tristate "round-robin scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | ---help--- | 
|  | 91 | The robin-robin scheduling algorithm simply directs network | 
|  | 92 | connections to different real servers in a round-robin manner. | 
|  | 93 |  | 
|  | 94 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 95 | module, choose M here. If unsure, say N. | 
|  | 96 |  | 
|  | 97 | config	IP_VS_WRR | 
|  | 98 | tristate "weighted round-robin scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | ---help--- | 
|  | 100 | The weighted robin-robin scheduling algorithm directs network | 
|  | 101 | connections to different real servers based on server weights | 
|  | 102 | in a round-robin manner. Servers with higher weights receive | 
|  | 103 | new connections first than those with less weights, and servers | 
|  | 104 | with higher weights get more connections than those with less | 
|  | 105 | weights and servers with equal weights get equal connections. | 
|  | 106 |  | 
|  | 107 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 108 | module, choose M here. If unsure, say N. | 
|  | 109 |  | 
|  | 110 | config	IP_VS_LC | 
|  | 111 | tristate "least-connection scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | ---help--- | 
|  | 113 | The least-connection scheduling algorithm directs network | 
|  | 114 | connections to the server with the least number of active | 
|  | 115 | connections. | 
|  | 116 |  | 
|  | 117 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 118 | module, choose M here. If unsure, say N. | 
|  | 119 |  | 
|  | 120 | config	IP_VS_WLC | 
|  | 121 | tristate "weighted least-connection scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 122 | ---help--- | 
|  | 123 | The weighted least-connection scheduling algorithm directs network | 
|  | 124 | connections to the server with the least active connections | 
|  | 125 | normalized by the server weight. | 
|  | 126 |  | 
|  | 127 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 128 | module, choose M here. If unsure, say N. | 
|  | 129 |  | 
|  | 130 | config	IP_VS_LBLC | 
|  | 131 | tristate "locality-based least-connection scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 132 | ---help--- | 
|  | 133 | The locality-based least-connection scheduling algorithm is for | 
|  | 134 | destination IP load balancing. It is usually used in cache cluster. | 
|  | 135 | This algorithm usually directs packet destined for an IP address to | 
|  | 136 | its server if the server is alive and under load. If the server is | 
|  | 137 | overloaded (its active connection numbers is larger than its weight) | 
|  | 138 | and there is a server in its half load, then allocate the weighted | 
|  | 139 | least-connection server to this IP address. | 
|  | 140 |  | 
|  | 141 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 142 | module, choose M here. If unsure, say N. | 
|  | 143 |  | 
|  | 144 | config  IP_VS_LBLCR | 
|  | 145 | tristate "locality-based least-connection with replication scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | ---help--- | 
|  | 147 | The locality-based least-connection with replication scheduling | 
|  | 148 | algorithm is also for destination IP load balancing. It is | 
|  | 149 | usually used in cache cluster. It differs from the LBLC scheduling | 
|  | 150 | as follows: the load balancer maintains mappings from a target | 
|  | 151 | to a set of server nodes that can serve the target. Requests for | 
|  | 152 | a target are assigned to the least-connection node in the target's | 
|  | 153 | server set. If all the node in the server set are over loaded, | 
|  | 154 | it picks up a least-connection node in the cluster and adds it | 
|  | 155 | in the sever set for the target. If the server set has not been | 
|  | 156 | modified for the specified time, the most loaded node is removed | 
|  | 157 | from the server set, in order to avoid high degree of replication. | 
|  | 158 |  | 
|  | 159 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 160 | module, choose M here. If unsure, say N. | 
|  | 161 |  | 
|  | 162 | config	IP_VS_DH | 
|  | 163 | tristate "destination hashing scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 164 | ---help--- | 
|  | 165 | The destination hashing scheduling algorithm assigns network | 
|  | 166 | connections to the servers through looking up a statically assigned | 
|  | 167 | hash table by their destination IP addresses. | 
|  | 168 |  | 
|  | 169 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 170 | module, choose M here. If unsure, say N. | 
|  | 171 |  | 
|  | 172 | config	IP_VS_SH | 
|  | 173 | tristate "source hashing scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 174 | ---help--- | 
|  | 175 | The source hashing scheduling algorithm assigns network | 
|  | 176 | connections to the servers through looking up a statically assigned | 
|  | 177 | hash table by their source IP addresses. | 
|  | 178 |  | 
|  | 179 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 180 | module, choose M here. If unsure, say N. | 
|  | 181 |  | 
|  | 182 | config	IP_VS_SED | 
|  | 183 | tristate "shortest expected delay scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 184 | ---help--- | 
|  | 185 | The shortest expected delay scheduling algorithm assigns network | 
|  | 186 | connections to the server with the shortest expected delay. The | 
|  | 187 | expected delay that the job will experience is (Ci + 1) / Ui if | 
|  | 188 | sent to the ith server, in which Ci is the number of connections | 
| Matt LaPlante | cab0089 | 2006-10-03 22:36:44 +0200 | [diff] [blame] | 189 | on the ith server and Ui is the fixed service rate (weight) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 190 | of the ith server. | 
|  | 191 |  | 
|  | 192 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 193 | module, choose M here. If unsure, say N. | 
|  | 194 |  | 
|  | 195 | config	IP_VS_NQ | 
|  | 196 | tristate "never queue scheduling" | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 197 | ---help--- | 
|  | 198 | The never queue scheduling algorithm adopts a two-speed model. | 
|  | 199 | When there is an idle server available, the job will be sent to | 
|  | 200 | the idle server, instead of waiting for a fast one. When there | 
|  | 201 | is no idle server available, the job will be sent to the server | 
|  | 202 | that minimize its expected delay (The Shortest Expected Delay | 
|  | 203 | scheduling algorithm). | 
|  | 204 |  | 
|  | 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. | 
|  | 207 |  | 
|  | 208 | comment 'IPVS application helper' | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 |  | 
|  | 210 | config	IP_VS_FTP | 
|  | 211 | tristate "FTP protocol helper" | 
| Jan Engelhardt | a6938a1 | 2007-05-23 14:48:10 -0700 | [diff] [blame] | 212 | depends on IP_VS_PROTO_TCP | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 213 | ---help--- | 
|  | 214 | FTP is a protocol that transfers IP address and/or port number in | 
|  | 215 | the payload. In the virtual server via Network Address Translation, | 
|  | 216 | the IP address and port number of real servers cannot be sent to | 
|  | 217 | clients in ftp connections directly, so FTP protocol helper is | 
|  | 218 | required for tracking the connection and mangling it back to that of | 
|  | 219 | virtual service. | 
|  | 220 |  | 
|  | 221 | If you want to compile it in kernel, say Y. To compile it as a | 
|  | 222 | module, choose M here. If unsure, say N. | 
|  | 223 |  | 
| Jan Engelhardt | a6938a1 | 2007-05-23 14:48:10 -0700 | [diff] [blame] | 224 | endif # IP_VS |