You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I trying to config HAProxy with stick-table feature. To make this work I'm using config-backend annotation, like this:
ingress.kubernetes.io/config-backend: | stick-table type string len 64 size 1m expire 8h stick store-response res.cook(JSESSIONID) stick match req.cook(JSESSIONID)
But I'm having trouble because we have multiple HAProxy instances and they don't share the table in memory. Also, if any pod changes, HAProxy need to reload and loses the table.
Looking HAProxy docs I found "peers" feature, that I can use to share stick-table between instances, like this:
This would be much easier if peers worked with resolvers - as far as I can tell, it only takes IP's
Alternatively, if you're using host network and your nodes don't change, you could just list all your nodes' IPs in the config
Hi, planning to add shared tables for rate/max/etc limits, btw already did some poc and tests with peers, but we've at least gateway api and control plane / data plane separation as priorities for now.
Anyway maybe adding some templating and var expansion in the config snippets seem to add some value for one that wants to make the peer configuration themselves. How does it sound? I can run a quick poc on that just to confirm if it's as simple as it seems to be.
Hello, I trying to config HAProxy with stick-table feature. To make this work I'm using config-backend annotation, like this:
ingress.kubernetes.io/config-backend: |
stick-table type string len 64 size 1m expire 8h
stick store-response res.cook(JSESSIONID)
stick match req.cook(JSESSIONID)
But I'm having trouble because we have multiple HAProxy instances and they don't share the table in memory. Also, if any pod changes, HAProxy need to reload and loses the table.
Looking HAProxy docs I found "peers" feature, that I can use to share stick-table between instances, like this:
peer haproxy1 192.168.0.1:1024
peer haproxy2 192.168.0.2:1024
peer haproxy3 10.2.0.1:1024
It's easy to add this in template with fixed servers, but how could I configure the template to list all HAProxy instances IP and add a line for each?
The text was updated successfully, but these errors were encountered: