haproxy/src
Willy Tarreau 760e81d356 MINOR: backend: implement random-based load balancing
For large farms where servers are regularly added or removed, picking
a random server from the pool can ensure faster load transitions than
when using round-robin and less traffic surges on the newly added
servers than when using leastconn.

This commit introduces "balance random". It internally uses a random as
the key to the consistent hashing mechanism, thus all features available
in consistent hashing such as weights and bounded load via hash-balance-
factor are usable. It is extremely convenient because one common concern
when using random is what happens when a server is hammered a bit too
much. Here that can trivially be avoided, like in the configuration below :

    backend bk0
        balance random
        hash-balance-factor 110
        server-template s 1-100 127.0.0.1:8000 check inter 1s

Note that while "balance random" internally relies on a hash algorithm,
it holds the same properties as round-robin and as such is compatible with
reusing an existing server connection with "option prefer-last-server".
2018-05-03 07:20:40 +02:00
..
51d.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
acl.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
action.c MINOR: action: Add function to check rules using an action ACT_ACTION_TRK_* 2017-10-31 11:36:12 +01:00
applet.c MEDIUM: applets: Don't process more than 200 active applets at once 2017-11-16 11:19:46 +01:00
arg.c MINOR: config: Add support for ARGT_MSK6 2018-01-25 22:25:40 +01:00
auth.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
backend.c MINOR: backend: implement random-based load balancing 2018-05-03 07:20:40 +02:00
base64.c [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.c DOC: buffers: clarify the purpose of the <from> pointer in offer_buffers() 2018-03-08 18:33:48 +01:00
cache.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
cfgparse.c MINOR: backend: implement random-based load balancing 2018-05-03 07:20:40 +02:00
channel.c BUG/MAJOR: channel: Fix crash when trying to read from a closed socket 2018-04-25 05:39:49 +02:00
checks.c BUG/MINOR: checks: Fix check->health computation for flapping servers 2018-05-02 14:57:58 +02:00
chunk.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
cli.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
compression.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
connection.c MINOR: accept-proxy: support proxy protocol v2 CRC32c checksum 2018-03-21 05:04:01 +01:00
da.c BUILD/MINOR: deviceatlas: enable thread support 2017-11-27 14:22:21 +01:00
dns.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
ev_epoll.c BUG/MINOR: fd: Don't clear the update_mask in fd_insert. 2018-04-03 19:38:15 +02:00
ev_kqueue.c BUG/MEDIUM: kqueue: When adding new events, provide an output to get errors. 2018-04-17 17:46:56 +02:00
ev_poll.c BUG/MINOR: fd: Don't clear the update_mask in fd_insert. 2018-04-03 19:38:15 +02:00
ev_select.c BUG/MINOR: fd: Don't clear the update_mask in fd_insert. 2018-04-03 19:38:15 +02:00
fd.c BUG/MINOR: fd/threads: properly lock the FD before adding it to the fd cache. 2018-02-08 17:24:06 +01:00
filters.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
flt_http_comp.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
flt_spoe.c BUG/MINOR: spoe: Fix parsing of dontlog-normal option 2018-04-26 11:50:30 +02:00
flt_trace.c MINOR: threads/filters: Update trace filter to add _per_thread callbacks 2017-10-31 13:58:32 +01:00
freq_ctr.c BUG/MAJOR: threads/freq_ctr: use a memory barrier to detect changes 2017-10-31 18:01:18 +01:00
frontend.c MINOR: proxy: Add fe_defbe fetcher 2018-04-16 15:51:57 +02:00
h1.c BUG/MINOR: h1: the HTTP/1 make status code parser check for digits 2017-11-09 11:15:45 +01:00
h2.c BUG/MEDIUM: h2: implement missing support for chunked encoded uploads 2018-04-26 10:20:44 +02:00
haproxy.c MINOR: export localpeer as an environment variable 2018-04-17 17:17:58 +02:00
hash.c MINOR: hash: add new function hash_crc32c 2018-03-21 05:04:01 +01:00
hathreads.c BUG/MEDIUM: threads: Fix the sync point for more than 32 threads 2018-05-02 17:58:36 +02:00
hdr_idx.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
hlua.c BUG/MINOR, BUG/MINOR: lua: Put tasks to sleep when waiting for data 2018-05-03 05:00:25 +02:00
hlua_fcn.c MINOR/CLEANUP: proxy: rename "proxy" to "proxies_list" 2017-11-24 17:21:27 +01:00
hpack-dec.c DEBUG: hpack: add more traces to the hpack decoder 2017-12-30 17:37:08 +01:00
hpack-enc.c MEDIUM: hpack: implement basic hpack encoding 2017-10-31 18:03:24 +01:00
hpack-huff.c BUG/MINOR: hpack: must reject huffman literals padded with more than 7 bits 2017-12-03 21:08:39 +01:00
hpack-tbl.c BUG/MINOR: hpack: fix harmless use of uninitialized value in hpack_dht_insert 2018-03-27 20:05:13 +02:00
i386-linux-vsys.c MEDIUM: listener: add support for linux's accept4() syscall 2012-10-08 20:11:03 +02:00
lb_chash.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fas.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fwlc.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_fwrr.c BUILD: threads: Rename SPIN/RWLOCK macros using HA_ prefix 2017-11-07 11:10:24 +01:00
lb_map.c BUG: MAJOR: lb_map: server map calculation broken 2017-12-14 17:36:39 +01:00
listener.c BUG/MINOR: listener: Don't decrease actconn twice when a new session is rejected 2018-03-23 16:21:50 +01:00
log.c MINOR: log: Keep the ref when a log server is copied to avoid duplicate entries 2018-04-05 15:13:54 +02:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c MEDIUM: Add parsing of mailers section 2015-02-03 00:24:16 +01:00
map.c MINOR: map: Add payload support to "add map" 2018-04-26 14:20:01 +02:00
memory.c BUG/MINOR: pools/threads: don't ignore DEBUG_UAF on double-word CAS capable archs 2018-02-22 14:18:45 +01:00
mux_h2.c BUG/MEDIUM: h2: implement missing support for chunked encoded uploads 2018-04-26 10:20:44 +02:00
mux_pt.c BUG/MAJOR: connection: refine the situations where we don't send shutw() 2017-12-22 18:54:05 +01:00
namespace.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
pattern.c BUG/MINOR: pattern: Add a missing HA_SPIN_INIT() in pat_ref_newid() 2018-04-19 17:49:48 +02:00
payload.c MINOR: payload: add new sample fetch functions to process distcc protocol 2017-10-13 11:47:19 +02:00
peers.c BUG/MEDIUM: peers: fix expire date wasn't updated if entry is modified remotely. 2018-01-22 16:03:25 +01:00
pipe.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
proto_http.c MINOR: http: Add support for 421 Misdirected Request 2018-04-28 07:03:39 +02:00
proto_tcp.c MINOR: fd: pass the iocb and owner to fd_insert() 2018-01-29 16:07:25 +01:00
proto_udp.c CLEANUP: fix inconsistency between fd->iocb, proto->accept and accept() 2016-04-14 11:18:22 +02:00
proto_uxst.c BUG/MEDIUM: threads/unix: Fix a deadlock when a listener is temporarily disabled 2018-03-16 11:19:07 +01:00
protocol.c BUILD: protocol: fix some build errors on OpenBSD 2016-08-10 19:31:58 +02:00
proxy.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
queue.c BUILD/MINOR: fix build when USE_THREAD is not defined 2018-03-26 17:17:59 +02:00
raw_sock.c BUG/MINOR: threads: Add missing THREAD_LOCAL on static here and there 2017-10-31 13:58:33 +01:00
regex.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
sample.c MINOR: sample: Add strcmp sample converter 2018-04-28 07:03:39 +02:00
server.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
session.c BUG/MINOR: listener: Don't decrease actconn twice when a new session is rejected 2018-03-23 16:21:50 +01:00
sha1.c IMPORT: sha1: import SHA1 functions 2017-10-25 04:45:48 +02:00
shctx.c BUILD: shctx: do not depend on openssl anymore 2017-11-08 14:33:36 +01:00
signal.c CLEANUP: pools: rename all pool functions and pointers to remove this "2" 2017-11-24 17:49:53 +01:00
ssl_sock.c MINOR: ssl: add fetch 'ssl_fc_session_key' and 'ssl_bc_session_key' 2018-04-30 14:56:19 +02:00
standard.c MINOR: servers: Support alphanumeric characters for the server templates names 2018-04-06 19:16:18 +02:00
stats.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
stick_table.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
stream.c MEDIUM: cli: Add payload support 2018-04-26 14:19:33 +02:00
stream_interface.c MINOR: early data: Don't rely on CO_FL_EARLY_DATA to wake up streams. 2018-02-05 14:24:50 +01:00
task.c MINOR: global: add some global activity counters to help debugging 2018-01-23 15:38:33 +01:00
tcp_rules.c MINOR: config: Enable tracking of up to MAX_SESS_STKCTR stick counters. 2018-01-29 13:53:56 +01:00
time.c BUG/MINOR: time/threads: ensure the adjusted time is always correct 2018-02-05 20:11:38 +01:00
trace.c CONTRIB: trace: try to display the function's return value on exit 2017-10-24 19:54:25 +02:00
uri_auth.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
vars.c BUG/MEDIUM: threads/vars: Fix deadlock in register_name 2017-12-08 10:37:24 +01:00
wurfl.c CLEANUP: log: Rename Alert/Warning in ha_alert/ha_warning 2017-11-24 17:19:12 +01:00
xxhash.c CLEANUP: remove unneeded casts 2016-04-03 14:17:42 +02:00