Kconfig 8.9 KB

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