|
Couple of questions regarding mod_jk:
1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. 2. Does mod_jk check if the system is up and running before forwarding that request to the server configured in worker.properties file? --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
1) As far as I know, no, mod_jk does not read workers.properties
dynamically. 2) Yes and no, it will not send a request unless communication has been established with the worker, it may happen that the worker fails, or someone shut it down. Depending on how you configure the workers and the number of workers, it can retry the request and/or try a different worker. Mod_jk will mark the worker on error when it does not respond, and it will try again after a configurable time -but it tries again with an actual request-. -----Original Message----- From: Mohit Anchlia [mailto:[hidden email]] Sent: Thursday, February 05, 2009 11:53 AM To: Tomcat Users List Subject: mod_jk Couple of questions regarding mod_jk: 1. Does apache read worker.properties dynamically? So if I change worker.property would it be dynamically read by mod_jk. 2. Does mod_jk check if the system is up and running before forwarding that request to the server configured in worker.properties file? --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by jgroups
Mohit Anchlia wrote:
> Couple of questions regarding mod_jk: > > 1. Does apache read worker.properties dynamically? So if I change > worker.property would it be dynamically read by mod_jk. > > 2. Does mod_jk check if the system is up and running before forwarding > that request to the server configured in worker.properties file? > Let's see what answers you get here .. :-) --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by jgroups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Mohit, Mohit Anchlia wrote: > 1. Does apache read worker.properties dynamically? So if I change > worker.property would it be dynamically read by mod_jk. mod_jk will not reload the workers.properties file, but if you use a separate mappings file, and you have mod_jk version 1.2.20 or later, you can use the JkMountFileReload directive and have it reload that at intervals. See http://tomcat.apache.org/connectors-doc/reference/apache.html for more details. > 2. Does mod_jk check if the system is up and running before forwarding > that request to the server configured in worker.properties file? Configurations with failover have ways of picking only running Tomcat instances on the backend. If you are not doing any clustering, you'll get a 500 Internal Server Error and a log message saying that Tomcat couldn't be contacted. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmLd2gACgkQ9CaO5/Lv0PA/rwCfZrUFY40ZkSpaA7zjywQyUzkd YYgAnj8RmUwksj3Wr2T8O4qXDrSbvsSV =Z6AH -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by jordiang
>
> 1) As far as I know, no, mod_jk does not read workers.properties > dynamically. > 2) Yes and no, it will not send a request unless communication has been > established with the worker, it may happen that the worker fails, or > someone shut it down. Depending on how you configure the workers and > the > number of workers, it can retry the request and/or try a different > worker. Mod_jk will mark the worker on error when it does not respond, > and it will try again after a configurable time -but it tries again > with > an actual request-. > It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Regards ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Well... as far as I know there is an option to check if a backend is
available (up to a certain level). Look in the documentation for ping_mode (mod_jk 1.2.27) http://tomcat.apache.org/connectors-doc/generic_howto/timeouts.html Hubert -----Original Message----- From: [hidden email] [mailto:[hidden email]] Sent: 06 February 2009 14:19 To: [hidden email] Subject: RE: mod_jk > > 1) As far as I know, no, mod_jk does not read workers.properties > dynamically. > 2) Yes and no, it will not send a request unless communication has been > established with the worker, it may happen that the worker fails, or > someone shut it down. Depending on how you configure the workers and > the > number of workers, it can retry the request and/or try a different > worker. Mod_jk will mark the worker on error when it does not respond, > and it will try again after a configurable time -but it tries again > with > an actual request-. > It would be really nice if you could test availability of a node with a configurable request instead of a live production request... (hint, hint) Regards ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Christopher Schultz-2
On 06.02.2009 00:34, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Mohit, > > Mohit Anchlia wrote: >> 1. Does apache read worker.properties dynamically? So if I change >> worker.property would it be dynamically read by mod_jk. > > mod_jk will not reload the workers.properties file, but if you use a > separate mappings file, and you have mod_jk version 1.2.20 or later, you > can use the JkMountFileReload directive and have it reload that at > intervals. See > http://tomcat.apache.org/connectors-doc/reference/apache.html for more > details. To avoid confusion: JkMountFilereload is for the JkMountFile not JkWorkersFile (i.e. uriworkermap.properties instead of workers.properties). Having a dynamic workers.properties would be nice too, but initalizing the workers is much more deeper down in the stack, so doing it dynamically is harder than just switching to a new mounting map. Maybe some day ... Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Gerhardus.Geldenhuis
[hidden email] wrote:
>> 1) As far as I know, no, mod_jk does not read workers.properties >> dynamically. >> 2) Yes and no, it will not send a request unless communication has > been >> established with the worker, it may happen that the worker fails, or >> someone shut it down. Depending on how you configure the workers and >> the >> number of workers, it can retry the request and/or try a different >> worker. Mod_jk will mark the worker on error when it does not respond, >> and it will try again after a configurable time -but it tries again >> with >> an actual request-. >> > > It would be really nice if you could test availability of a node with a > configurable request instead of a live production request... (hint, > hint) > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
On 06.02.2009 18:23, André Warnier wrote:
> [hidden email] wrote: >>> 1) As far as I know, no, mod_jk does not read workers.properties >>> dynamically. >>> 2) Yes and no, it will not send a request unless communication has >> been >>> established with the worker, it may happen that the worker fails, or >>> someone shut it down. Depending on how you configure the workers and >>> the >>> number of workers, it can retry the request and/or try a different >>> worker. Mod_jk will mark the worker on error when it does not respond, >>> and it will try again after a configurable time -but it tries again >>> with >>> an actual request-. >>> >> >> It would be really nice if you could test availability of a node with a >> configurable request instead of a live production request... (hint, >> hint) >> > Isn't that what "ping" is about ? Ping tests, whether there is something able to still process AJP on the other side of the connection. A configurable request would be able to talk to the application, so one could detect, whether it is still deployed, and if the request would be handled by an intelligent servlet it could respond with some sort of application layer health status. Worth filing an enhancement request, since Mladen put the Watchdog thread into 1.2.27, we can easily add more logic of that type. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Rainer, Rainer Jung wrote: > Worth filing an enhancement request, since Mladen put the Watchdog > thread into 1.2.27, we can easily add more logic of that type. Maybe ajping? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmMghoACgkQ9CaO5/Lv0PBSKgCgrkYbLmw8dZjWJBqIsVwv1KOb aYcAn0VnuF6U0J7FBGFifEo6Pya3YwFi =mivz -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
In reply to this post by Rainer Jung-3
Hi Rainer,
your comment about the watchdog sounds interesting. When you load balance it would seem useful to get feedback from Tomcat itself about its load so that the module can adjust dynamically its load (lbfactor) based on the Tomcat's performance rather than a session/socket count. One can wonder if such added complexity would be detrimental to the mod_jk stability. Rgds - Fred
|
|
Sorry I am little confused about couple of things:
1. Based on what I read it looks like workers.properties is not loaded dynamically. And JkMountFileReload doesn't work for worker.properties but it works for uriworkermap.properties. 2. Wouldn't setting prepost timeout ensure that a check is made to see if remote machine is up before forwarding the request? On Fri, Feb 6, 2009 at 11:01 AM, fredk2 <[hidden email]> wrote: > > Hi Rainer, > > your comment about the watchdog sounds interesting. When you load balance > it would seem useful to get feedback from Tomcat itself about its load so > that the module can adjust dynamically its load (lbfactor) based on the > Tomcat's performance rather than a session/socket count. One can wonder if > such added complexity would be detrimental to the mod_jk stability. > > Rgds - Fred > > > Rainer Jung-3 wrote: >> >> On 06.02.2009 18:23, André Warnier wrote: >>> [hidden email] wrote: >>>>> 1) As far as I know, no, mod_jk does not read workers.properties >>>>> dynamically. >>>>> 2) Yes and no, it will not send a request unless communication has >>>> been >>>>> established with the worker, it may happen that the worker fails, or >>>>> someone shut it down. Depending on how you configure the workers and >>>>> the >>>>> number of workers, it can retry the request and/or try a different >>>>> worker. Mod_jk will mark the worker on error when it does not respond, >>>>> and it will try again after a configurable time -but it tries again >>>>> with >>>>> an actual request-. >>>>> >>>> >>>> It would be really nice if you could test availability of a node with a >>>> configurable request instead of a live production request... (hint, >>>> hint) >>>> >>> Isn't that what "ping" is about ? >> >> Ping tests, whether there is something able to still process AJP on the >> other side of the connection. A configurable request would be able to >> talk to the application, so one could detect, whether it is still >> deployed, and if the request would be handled by an intelligent servlet >> it could respond with some sort of application layer health status. >> >> Worth filing an enhancement request, since Mladen put the Watchdog >> thread into 1.2.27, we can easily add more logic of that type. >> >> Regards, >> >> Rainer >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> >> > > -- > View this message in context: http://www.nabble.com/mod_jk-tp21856049p21878692.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
Mohit Anchlia wrote:
> Sorry I am little confused about couple of things: > > 1. Based on what I read it looks like workers.properties is not loaded > dynamically. And JkMountFileReload doesn't work for worker.properties > but it works for uriworkermap.properties. Correct, that is what was said. In clear it means that you can to a certain extent dynamically change the URI's that will be redirected to Tomcat, but you cannot change the kind of properties that are in workers.properties (the address of the back-end Tomcats etc..) > 2. Wouldn't setting prepost timeout ensure that a check is made to see > if remote machine is up before forwarding the request? Yes. But if you have only one Tomcat to send requests to, then all this tells you is that this Tomcat is not responding. So now what do you do ? I'll use an image : finding out that the back-end Tomcat does not even respond to a ping, rather than sending the whole request and getting an error then (which is more time-consuming), is a way to know faster that there is a problem. But you still have this hot client request in your lap, so now what do you do with it ? If you have 2 or more Tomcats, then it really helps, because mod_jk can redirect the request to a Tomcat which still works. But if there is only one anyway, you're cooked. > On Fri, Feb 6, 2009 at 11:01 AM, fredk2 <[hidden email]> wrote: >> Hi Rainer, >> >> your comment about the watchdog sounds interesting. When you load balance >> it would seem useful to get feedback from Tomcat itself about its load so >> that the module can adjust dynamically its load (lbfactor) based on the >> Tomcat's performance rather than a session/socket count. One can wonder if >> such added complexity would be detrimental to the mod_jk stability. >> >> Rgds - Fred >> >> >> Rainer Jung-3 wrote: >>> On 06.02.2009 18:23, André Warnier wrote: >>>> [hidden email] wrote: >>>>>> 1) As far as I know, no, mod_jk does not read workers.properties >>>>>> dynamically. >>>>>> 2) Yes and no, it will not send a request unless communication has >>>>> been >>>>>> established with the worker, it may happen that the worker fails, or >>>>>> someone shut it down. Depending on how you configure the workers and >>>>>> the >>>>>> number of workers, it can retry the request and/or try a different >>>>>> worker. Mod_jk will mark the worker on error when it does not respond, >>>>>> and it will try again after a configurable time -but it tries again >>>>>> with >>>>>> an actual request-. >>>>>> >>>>> It would be really nice if you could test availability of a node with a >>>>> configurable request instead of a live production request... (hint, >>>>> hint) >>>>> >>>> Isn't that what "ping" is about ? >>> Ping tests, whether there is something able to still process AJP on the >>> other side of the connection. A configurable request would be able to >>> talk to the application, so one could detect, whether it is still >>> deployed, and if the request would be handled by an intelligent servlet >>> it could respond with some sort of application layer health status. >>> >>> Worth filing an enhancement request, since Mladen put the Watchdog >>> thread into 1.2.27, we can easily add more logic of that type. >>> >>> Regards, >>> >>> Rainer >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [hidden email] >>> For additional commands, e-mail: [hidden email] >>> >>> >>> >> -- >> View this message in context: http://www.nabble.com/mod_jk-tp21856049p21878692.html >> Sent from the Tomcat - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [hidden email] >> For additional commands, e-mail: [hidden email] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [hidden email] > For additional commands, e-mail: [hidden email] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
|
> But if you have only one Tomcat to send requests to, then all this tells
you is that this Tomcat is not responding. So now what do you do ? In this case, I want apache to treat the request as DECLINED by mod_jk, so that if we put some static content in apache at this place, it will be served at least until tomcat is ready again. Which means, if we can test tomcat's availability before sending it the actual request, we can DECLINE the request if necessary, and thereby apache will serve it if it can.
|
|
In reply to this post by André Warnier
> But if you have only one Tomcat to send requests to, then all this tells
you is that this Tomcat is not responding. So now what do you do ? In this case, I want apache to treat the request as DECLINED by mod_jk, so that if we put some static content in apache at this place, it will be served at least until tomcat is ready again. Which means, if we can test tomcat's availability before sending it the actual request, we can DECLINE the request if necessary, and thereby apache will serve it if it can.
|
|
In reply to this post by ilndinesh
On 25.02.2009 03:12, ilndinesh wrote:
>> But if you have only one Tomcat to send requests to, then all this tells > you is that this Tomcat is not responding. So now what do you do ? > > In this case, I want apache to treat the request as DECLINED by mod_jk, so > that if we put some static content in apache at this place, it will be > served at least until tomcat is ready again. > Which means, if we can test tomcat's availability before sending it the > actual request, we can DECLINE the request if necessary, and thereby apache > will serve it if it can. Can you please file an enhancement request in Bugzilla, so that we don't forget about this. We could make that behaviour configurable. By default we would da lb failover or return an error page if no worker is left or no lb is involved, but optionally we could return DECLINE in all such cases or at least when no failover worker is left. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] |
| Powered by Nabble | Edit this page |
