Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 85687 invoked from network); 3 Dec 2008 22:10:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Dec 2008 22:10:41 -0000 Received: (qmail 5993 invoked by uid 500); 3 Dec 2008 22:10:42 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 5606 invoked by uid 500); 3 Dec 2008 22:10:41 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 5595 invoked by uid 99); 3 Dec 2008 22:10:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 14:10:41 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2008 22:09:10 +0000 Received: from [192.168.2.106] ([192.168.2.106]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id mB3M2PSZ010740 for ; Wed, 3 Dec 2008 23:02:25 +0100 (CET) Message-ID: <493701D7.3060807@kippdata.de> Date: Wed, 03 Dec 2008 23:01:59 +0100 From: Rainer Jung User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: can mod_jk detect web service unavailable References: <3623382.436751228298810598.JavaMail.coremail@bj163app128.163.com> In-Reply-To: <3623382.436751228298810598.JavaMail.coremail@bj163app128.163.com> Content-Type: text/plain; charset=x-gbk Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Zeke schrieb: > Hi: I have a JBOSS cluster which use Apache with mod_jk as HTTP load > balancer. In my cluster, some nodes are deployed web service, but not > all. For example, node 1 contains web servicebook_service, I can call > the web service using URL "http://www.node1.com/book_service", but > node 2 does not contain it. I hope mod_jk can help me to detect > whether the requested web service exists. That is to say, if I call > the web service using "http://www.loadbalancer.com/book_service", > mod_jk can know only node 1 contains the web service and node 2 not, > then the request will always be dispatched to node 1. But with my > current configuration on mod_jk and Apache, I fount that the request > can be dispatched to node 2. Then surely exception will be thrown, > since the web service not exists on node 2. Can mod_jk support it? Do > I need some specific configuration? Any suggestion from you will be > very appreciated! If that would be an error situation and you want mod_jk to detect that, then look at fail_on_status in the documentation at: http://tomcat.apache.org/connectors-doc/reference/workers.html (and use negative codes). If this is how you regularly deploy your apps, you should thin twice, if the idea is good. You can: - use several load balancers, each with a different (maybe overlapping) set of balanced workers (e.g. one for book_service etc.). To get the stickyness right, you would then need to set the "route" attribute of the balancer embers. - use one load balancer and use mapping extensions to configure some nodes stopped for individual mounts. See http://tomcat.apache.org/connectors-doc/reference/uriworkermap.html#Rule%20extensions Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org