httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [users@httpd] Load balancing based on header value
Date Wed, 30 Mar 2016 19:50:46 GMT
Hash: SHA1


On 3/30/16 3:02 PM, Niranjan Rao wrote:
> I am using AJP to connect to tomcat.
> Entry in the config file looks like
> <Proxy balancer://cluster> BalancerMember ajp://myserver:8009
> route=node2 ProxySet lbmethod=bytraffic ProxySet
> stickysession=JSESSIONID </Proxy>
> Hope this answers your question.

Okay, so you are using mod_proxy_ajp.

I'm not sure how to do it in mod_proxy_ajp, but mod_jk allows the
request to override the worker to be used. I believe if you set the
JK_WORKER_NAME environment variable (for mod_jk only) that worker name
will be used. You can use whatever means in httpd to set that variable
such as mod_rewrite, etc.

I would imagine that there is a similar facility in mod_proxy_ajp.

- -chris

> On 3/30/16 2:15 PM, Niranjan Rao wrote:
>>>> Greetings,
>>>> My first post to this mailing list.
>>>> I have apache2 load balancing working perfectly based on
>>>> session affinity. Traffic does get directed properly to
>>>> appropriate tomcat server.
>>>> We are trying to use same servers to serve some REST API
>>>> calls. These calls don't have a session, however tomcat
>>>> honouring the request does maintain some state and we would
>>>> like to redirect the traffic to same tomcat based on some
>>>> header value.
>>>> Tried searching and reading documents from apache web site,
>>>> but have not figured it out yet.
>>>> Can I load balance based on header value? It seems to be
>>>> doable, but could not find any example or how-to.
> Which module are you using to proxy httpd -> Tomcat?
> -chris
>> ---------------------------------------------------------------------
To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
To unsubscribe, e-mail:
> For additional commands, e-mail:
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message