haproxy/include/types
Oskar Stolc 8dc4184c57 MINOR: balance uri: added 'whole' parameter to include query string in hash calculation
This patch brings a new "whole" parameter to "balance uri" which makes
the hash work over the whole uri, not just the part before the query
string. Len and depth parameter are still honnored.

The reason for this new feature is explained below.

I have 3 backend servers, each accepting different form of HTTP queries:

http://backend1.server.tld/service1.php?q=...
http://backend1.server.tld/service2.php?q=...

http://backend2.server.tld/index.php?query=...&subquery=...

http://backend3.server.tld/image/49b8c0d9ff

Each backend server returns a different response based on either:
- the URI path (the left part of the URI before the question mark)
- the query string (the right part of the URI after the question mark)
- or the combination of both

I wanted to set up a common caching cluster (using 6 Squid servers, each
configured as reverse proxy for those 3 backends) and have HAProxy balance
the queries among the Squid servers based on URL. I also wanted to achieve
hight cache hit ration on each Squid server and send the same queries to
the same Squid servers. Initially I was considering using the 'balance uri'
algorithm, but that would not work as in case of backend2 all queries would
go to only one Squid server. The 'balance url_param' would not work either
as it would send the backend3 queries to only one Squid server.

So I thought the simplest solution would be to use 'balance uri', but to
calculate the hash based on the whole URI (URI path + query string),
instead of just the URI path.
2012-05-22 07:56:54 +02:00
..
acl.h MEDIUM: acl: support IPv6 address matching 2012-05-08 21:28:14 +02:00
arg.h MEDIUM: add a new typed argument list parsing framework 2012-05-08 20:57:10 +02:00
auth.h [REORG] http: move the http-request rules to proto_http 2011-03-13 22:00:24 +01:00
backend.h BUG/MAJOR: checks: don't call set_server_status_* when no LB algo is set 2012-05-19 19:09:46 +02:00
buffers.h MAJOR: http: move buffer->lr to http_msg->next 2012-05-08 12:28:11 +02:00
capture.h [MAJOR] last bunch of capture changes for mempool v2 2007-05-13 22:46:04 +02:00
checks.h CLEANUP: Fix HCHK spelling errors 2012-03-24 21:54:25 +01:00
counters.h [MINOR] stats: report the number of requests intercepted by the frontend 2011-09-10 23:32:41 +02:00
fd.h CLEANUP: fd: remove unused cb->b pointers in the struct fdtab 2012-05-13 00:35:44 +02:00
freq_ctr.h [MINOR] freq_ctr: add new types and functions for periods different from 1s 2010-08-10 14:01:09 +02:00
global.h BUG/MAJOR: trash must always be the size of a buffer 2012-05-16 14:21:55 +02:00
hdr_idx.h [BUG] files were missing for hdr_idx in previous commit 2006-12-04 02:20:02 +01:00
lb_chash.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fwrr.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_map.h [CLEANUP] proxy: move last lb-specific bits to their respective files 2009-10-03 18:41:18 +02:00
log.h MINOR: log: log-format: usable without httplog and tcplog 2012-04-07 16:25:26 +02:00
peers.h MEDIUM: stream_interface: derive the socket operations from the target 2012-05-11 18:52:14 +02:00
pipe.h [MEDIUM] introduce pipe pools 2009-01-25 13:49:53 +01:00
port_range.h [MEDIUM] add support for binding to source port ranges during connect 2009-06-10 12:23:32 +02:00
proto_http.h MEDIUM: http: get rid of msg->som which is not used anymore 2012-05-18 23:50:43 +02:00
proto_tcp.h [MINOR] session-counters: use "track-sc{1,2}" instead of "track-{fe,be}-counters" 2010-08-10 18:04:15 +02:00
protocols.h MEDIUM: protocol: add a pointer to struct sock_ops to the listener struct 2012-05-21 22:22:39 +02:00
proxy.h MINOR: balance uri: added 'whole' parameter to include query string in hash calculation 2012-05-22 07:56:54 +02:00
queue.h [MAJOR] ported pendconn to mempools v2 2007-05-13 20:19:55 +02:00
sample.h REORG: rename "pattern" files 2012-05-08 20:57:21 +02:00
server.h MEDIUM: stream_interface: derive the socket operations from the target 2012-05-11 18:52:14 +02:00
session.h MEDIUM: stream_sock: add a get_src and get_dst callback and remove SN_FRT_ADDR_SET 2012-04-07 18:03:52 +02:00
signal.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
stick_table.h [MEDIUM] IPv6 support for stick-tables 2011-03-29 01:09:14 +02:00
stream_interface.h MINOR: stream_interface: add a pointer to the listener for TARG_TYPE_CLIENT 2012-05-21 22:22:39 +02:00
task.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
template.h [CLEANUP] included common/version.h everywhere 2006-06-29 18:54:54 +02:00