You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Torsten Krah <kr...@gmail.com> on 2019/05/08 12:55:30 UTC

[users@httpd] mod_proxy_balancer / mod_proxy_http question - stick tables support based on url

Hi all,

I've got a question about:

https://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html
and
https://httpd.apache.org/docs/2.4/mod/mod_proxy_balancer.html


Can balancing of apache httpd be configured to use stick tables to
balance requests (having HAProxy in mind)?

With HAProxy you could define something like:

  stick-table type string len 256 size 1M expire 1h
  stick on path,field(3,/) table mytable

I want to balance requests with httpd based on a part of the URL (no
cookies there) (/r/${balancePart}/...) and it should balance that in a
way that there are some preferred rules like:

balancePart in (1,2,3,4,5) -> use Server A,B,C,D
balancePart in (6,7)       -> use Server E,F
balancePart in (other)     -> use Server E,F,H

Nevertheless if some of the destinations are failing - it should fall
back to whatever destination is still there.

Can this be achieved with httpd at all - if so, how?

If not all of those requirements are possible - what would be the best
I could achieve with mod_proxy_balancer + mod_proxy_http?

thanks and kind regards

Torsten