From: Stefan Fritsch Date: Sun, 11 Oct 2009 21:00:13 +0000 (+0000) Subject: Add example of load balancing with stickyness using mod_headers. X-Git-Tag: 2.3.3~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1acb3cb347821cc9f05ad8fb507411ab4d4352fd;p=apache Add example of load balancing with stickyness using mod_headers. PR: 46167 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@824151 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy_balancer.xml b/docs/manual/mod/mod_proxy_balancer.xml index 98efcfd0ff..f6cb5908b4 100644 --- a/docs/manual/mod/mod_proxy_balancer.xml +++ b/docs/manual/mod/mod_proxy_balancer.xml @@ -67,7 +67,7 @@
- Example of a balancer configuration + Examples of a balancer configuration

Before we dive into the technical details, here's an example of how you might use mod_proxy_balancer to provide load balancing between two back-end servers: @@ -80,6 +80,22 @@ </Proxy>
ProxyPass /test balancer://mycluster/ + +

Another example of how to provide load balancing with stickyness + using mod_headers, even if the backend server does + not set a suitable session cookie: +

+ + + Header add Set-Cookie: "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" + env=BALANCER_ROUTE_CHANGED
+ <Proxy balancer://mycluster>
+ BalancerMember http://192.168.1.50:80 route=1
+ BalancerMember http://192.168.1.51:80 route=2
+ ProxySet stickysession=ROUTEID
+ </Proxy>
+ ProxyPass /test balancer://mycluster/ +