Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Stick on url_param

$
0
0

Hello. I would like to ask if it is possible to stick to individual server based on url_param?

I have HAProxy load balancer and couple of proxies as a backend. I would like to stick to one of the backend proxies if the url_param is matching with one stored in stick table.

I have config file:

frontend testfrontend
        bind IP:PORT
        default_backend proxies
backend proxies
        stick-table type string size 1m expire 1h
        stick on url_param(session_id) table proxies
        stick store-request url_param(session_id) table proxies
        http-request set-uri '%[url,regsub("^(.*)(&|\?)session_id[^&]*(?:&|$)(.*)",\1\2\3)]'

        # Hosts
        server host1 IP:PORT check
        server host2 IP:PORT check
        server host3 IP:PORT check
        server host4 IP:PORT check

It should now stick to session on matching url param but it doesn’t and instead it is cycling through proxies.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>