Am 24-03-2017 19:20, schrieb redundantl y:

I take it this isn't possible?

Thanks.

On Wed, Mar 22, 2017 at 6:01 PM, redundantl y <[email protected]> wrote:

I'm very, very new to HAproxy (started trying it out an hour ago) and am looking at setting up a sticky-table based on multiple url_params.

I've got it working using a single parameter, but I'm wondering if I can set it up to create table entries (keys) based on multiple url_param entries when found. For example using a URL like this:

http://example.com/[email protected]&newsletter_id=12345

I'd like it to create a key based on the strings in both the email and newsletter_id parameters. Right now if I use the following it'll use just email or newsletter_id if the former isn't found:

stick on url_param(email) table detailspage
stick on url_param(newsletter_id) table detailspage

how about to try this, it's untested.

http-request set-var(req.mysticky) url_param(email),url_param(newsletter_id)
stick on req.mysticky table detailspage

I refer her to 1.7 due to the fact that you haven't told us which version you use
http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-http-request

What the sticky-table currently looks like:

$ echo "show table detailspage" | socat unix:/var/run/haproxy.sock -
# table: detailspage, type: string, size:5242880, used:3
0x7f90f0cc9a24: key=12345 use=0 exp=596822 server_id=1
0x7f90f0cc9754: [email protected] use=0 exp=593655 server_id=1
0x7f90f0cc9964: [email protected] use=0 exp=595455 server_id=2

Thanks.

Reply via email to