]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: lb_first: add reference to a paper describing the original idea
authorWilly Tarreau <w@1wt.eu>
Sat, 7 Apr 2012 07:08:45 +0000 (09:08 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 7 Apr 2012 07:08:45 +0000 (09:08 +0200)
The original idea behind this implementation has been published in the
paper below :

   http://reports-archive.adm.cs.cmu.edu/anon/2012/CMU-CS-12-109.pdf

doc/configuration.txt
src/lb_fas.c

index 46f3653a7ce5e73302a3f8d5150af10fa9143bb8..782bda9e816050e94a62dcf3778af4417df3c690 100644 (file)
@@ -1280,13 +1280,18 @@ balance url_param <param> [check_post [<max_wait>]]
                   connection. The servers are choosen from the lowest numeric
                   identifier to the highest (see server parameter "id"), which
                   defaults to the server's position in the farm. Once a server
-                  reaaches its maxconn value, the next server is used. It does
+                  reaches its maxconn value, the next server is used. It does
                   not make sense to use this algorithm without setting maxconn.
                   The purpose of this algorithm is to always use the smallest
                   number of servers so that extra servers can be powered off
                   during non-intensive hours. This algorithm ignores the server
                   weight, and brings more benefit to long session such as RDP
-                  or IMAP than HTTP, though it can be useful there too.
+                  or IMAP than HTTP, though it can be useful there too. In
+                  order to use this algorithm efficiently, it is recommended
+                  that a cloud controller regularly checks server usage to turn
+                  them off when unused, and regularly checks backend queue to
+                  turn new servers on when the queue inflates. Alternatively,
+                  using "http-check send-state" may inform servers on the load.
 
       source      The source IP address is hashed and divided by the total
                   weight of the running servers to designate which server will
index 07baf5d21154cb12867c3d1a0ec51c9e8d63a5ce..daff66629b85c95553092eaa278863aeb1ae27e7 100644 (file)
@@ -1,6 +1,12 @@
 /*
  * First Available Server load balancing algorithm.
  *
+ * This file implements an algorithm which emerged during a discussion with
+ * Steen Larsen, initially inspired from Anshul Gandhi et.al.'s work now
+ * described as "packing" in section 3.5:
+ *
+ *    http://reports-archive.adm.cs.cmu.edu/anon/2012/CMU-CS-12-109.pdf
+ *
  * Copyright 2000-2012 Willy Tarreau <w@1wt.eu>
  *
  * This program is free software; you can redistribute it and/or