Hi,

Sharma, Siddharth schrieb:
> Hi
> 
> We have a cluster of Linux (RedHat) machines each housing an apache, 4
> tomcat instances and 4 other jvms that run our custom servers.
> Each tomcat has a corresponding custom server that it delegates requests to.
> In other words, there is one to one correspondence between a tomcat instance
> and a custom server instance.
> Problem is that when a custom server crashes and its tomcat is still
> accepting, mod_jk does not mark it down. Consequently users continue to be
> directed to that tomcat even though they are experiencing errors.
> In mod_jk, we have defined a load balancing worker that fronts the 4 tomcat
> workers.
> So questions are:
> 
> 1. On what basis does mod_jk mark a tomcat worker down? Is it http return
> codes?

Never http return code. jk detects communication failures betwenn apache
and tomcat:

- timeouts
- connection problems
- missing answers
- client (browser) aborts

> 
> 2. Some load balancers allow scraping of the http body to see if there is an
> error in addition to relying on http codes. Is that possible in mod_jk? Is
> it configurable?

No. You need to do that externally.

> 
> 3. Is it possible to stop|start a mod_jk worker via an http call? Or some
> other programmable way? 

Yes. Configure a status worker:

worker.list=admin
worker.admin.type=status

The name of the worker (here: admin) is arbitrary.
Map the worker to a url in your web server, e.g. using JkMount in
Apache. Add access control to the URL (using web server methods).

Then open the URL in your browser and get used to its features. You can
click on the individual worker members of a balancer and a form will pop
up, allowing to disable (no more new sessions) or stop (no more
requests) this worker. The request when sending the form is a GET
request, so you can learn the URL syntax easily.

Be careful: these changes are not persistant. Apache restart, even
graceful, throws you back to your config file settings.

Regards,

Rainer

> 
> Any ideas on how to solve this problem?
> 
> Thanks
> Sidd
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to