Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
Hi, I've been asking some more questions about restarts on the Apache list, and was redirected back here... Does anyone know (David, Mladen?) what will happen to session affinity is this situation? ie with Apache in front of several tomcats using mod_jk, when Apache is restarted gracefully using apache -k restart (Windows) will session affinity be preserved across the restart? ie will browsers with a session open with a particular Tomcat continue being directed to that particular Tomcat after the restart? cheers, David |-+ | | David Rees | | | [EMAIL PROTECTED]| | | m | | || | | 05/25/2005 02:37 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| On 5/25/05, [EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. Have you seen if a graceful restart of Apache works for you? Graceful restarts of Apache have worked for me in the past to add new workers without dropping requests. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: *SPAM* Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
On 6/7/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does anyone know (David, Mladen?) what will happen to session affinity is this situation? ie with Apache in front of several tomcats using mod_jk, when Apache is restarted gracefully using apache -k restart (Windows) will session affinity be preserved across the restart? ie will browsers with a session open with a particular Tomcat continue being directed to that particular Tomcat after the restart? Session affinity is determined by the suffix of the jsessionid cookie which is stored on the client, so yes, session affinity will be retained across Apache restarts (graceful or not). -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
[EMAIL PROTECTED] wrote: Hi, I've been asking some more questions about restarts on the Apache list, and was redirected back here... Does anyone know (David, Mladen?) what will happen to session affinity is this situation? ie with Apache in front of several tomcats using mod_jk, when Apache is restarted gracefully using apache -k restart (Windows) will session affinity be preserved across the restart? ie will browsers with a session open with a particular Tomcat continue being directed to that particular Tomcat after the restart? First of all graceful restart will not work on Windows for any busy server. I suggest that you move to some unix/linux version. And yes, the session affinity will be preserved because it is related to the worker name and jvmRoute. Also, like somebody already told you: The easiest is to try by yourself, and then come up with the real problem. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
First of all graceful restart will not work on Windows for any busy server. I suggest that you move to some unix/linux version. Errr...could you explain why? I was told on the Apache list that it does work on Windows...what am I missing? cheers, David |-+ | | Mladen Turk | | | [EMAIL PROTECTED]| | | | | || | | 06/07/2005 01:37 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Session Affinity after Graceful Apache restart? [was Re: Addingworking dynamically | |with mod_jk status?] | ---| [EMAIL PROTECTED] wrote: Hi, I've been asking some more questions about restarts on the Apache list, and was redirected back here... Does anyone know (David, Mladen?) what will happen to session affinity is this situation? ie with Apache in front of several tomcats using mod_jk, when Apache is restarted gracefully using apache -k restart (Windows) will session affinity be preserved across the restart? ie will browsers with a session open with a particular Tomcat continue being directed to that particular Tomcat after the restart? First of all graceful restart will not work on Windows for any busy server. I suggest that you move to some unix/linux version. And yes, the session affinity will be preserved because it is related to the worker name and jvmRoute. Also, like somebody already told you: The easiest is to try by yourself, and then come up with the real problem. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
[EMAIL PROTECTED] wrote: First of all graceful restart will not work on Windows for any busy server. I suggest that you move to some unix/linux version. Errr...could you explain why? I was told on the Apache list that it does work on Windows...what am I missing? It works of course, but IIRC you are planning to use it for reconfiguring mod_jk. I think you might get into the problems with shared memory (particularly on unix) because some child might have a different idea about shared memory addresses. If you do not delete any worker and add new one at the end of the worker.list it might work. Anyhow it's not something I would use in the production and rely on its proper behavior. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
At 02:08 PM 6/7/2005, Mladen Turk wrote: It works of course, but IIRC you are planning to use it for reconfiguring mod_jk. I think you might get into the problems with shared memory (particularly on unix) because some child might have a different idea about shared memory addresses. Oh - so this is a bug/design flaw in mod_jk? Does the same affect the prefork/worker MPMs? One aspect is inheritance of handles (e.g. handle to SHM segment). I've always ment to make that more generic, and it would be nice to solve for Apache 2.2. It's used now to hand of the score and listener handles from the parent to child. The trivial solution is to use an anon segment which Win32 will not inherit, which means that SHM is unique to a single generation, and won't be polluted by changes in another worker. This does sound like a good use case, though, for handing off memory segments, mutexes and so forth to child processes. With a pointer or two, I'll be happy to look at it. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session Affinity after Graceful Apache restart? [was Re: Adding working dynamically with mod_jk status?]
William A. Rowe, Jr. wrote: At 02:08 PM 6/7/2005, Mladen Turk wrote: It works of course, but IIRC you are planning to use it for reconfiguring mod_jk. I think you might get into the problems with shared memory (particularly on unix) because some child might have a different idea about shared memory addresses. Oh - so this is a bug/design flaw in mod_jk? Does the same affect the prefork/worker MPMs? Actually the WIN32 has no such problems because it uses the plain memory instead of shared. Problem with WIN32 is because the closing child and new child will not share the worker data during restart, so you will loose the statistics during restart. With unixes the problem is because the workers are allocated according to the worker.list and balance_members. If you change those lists in the config on restart the child processes could have different shared memory segment addresses. Like said if you only add to the end of list then everything will probably be OK. To resolve that we would actually need a database like shared memory with worker name as a key. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Graceful restart on Windows [was Re: Adding working dynamically with mod_jk status?]
On 6/1/05, Bernard [EMAIL PROTECTED] wrote: I follow this sequence because mod_jk returns a server error if it cannot connect to Tomcat. To avoid this during Tomcat restarts, you need to have 2 Tomcat instances running and set them up with mod_jk to load balance across them. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Graceful restart on Windows [was Re: Adding working dynamically with mod_jk status?]
At 04:44 PM 5/31/2005, [EMAIL PROTECTED] wrote: After some more digging, it *appears* that apache -k restart WILL do a graceful restart of Apache2 on Windoze. Of course it will. Can anyone confirm this please? And are there any gotcha's to watch out for? Can someone explain exactly how this works? eg if I am in the middle of a chunk (or series) of work with a web browser and one of the tomcats, will it restart in the middle of that? It has nothing to do with Tomcat [in fact it's mildly off-topic here.] Essentially, the old child with multiple workers is told to quit it, so it stops accepting requests, and fulfills all the pending requests it accept()ed. And a new child is kicked off to serve all future incoming requests. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Graceful restart on Windows [was Re: Adding working dynamically with mod_jk status?]
Hi, I use Apache httpd, mod_jk and Tomcat 5 under Linux. Re-staring Apache httpd alone should never be a problem. However when I re-start Tomcat, then I follow this sequence: - Stop Apache httpd - Restart Tomcat - Start Apache httpd I follow this sequence because mod_jk returns a server error if it cannot connect to Tomcat. In order for this to work, the Tomcat restart operation must truly block (no timeout guessing workarounds here, please) so that the last step Start Apache httpd does not start before Tomcat is running again, and that there is no time wasted in the Restart Tomcat step. Tomcat takes an awful lot of time to start unfortunately. For more info refer to: http://issues.apache.org/bugzilla/show_bug.cgi?id=34140 jsvc does not block on Linux Bernard On Wed, 01 Jun 2005 02:30:14 -0500, you wrote: At 04:44 PM 5/31/2005, [EMAIL PROTECTED] wrote: After some more digging, it *appears* that apache -k restart WILL do a graceful restart of Apache2 on Windoze. Of course it will. Can anyone confirm this please? And are there any gotcha's to watch out for? Can someone explain exactly how this works? eg if I am in the middle of a chunk (or series) of work with a web browser and one of the tomcats, will it restart in the middle of that? It has nothing to do with Tomcat [in fact it's mildly off-topic here.] Essentially, the old child with multiple workers is told to quit it, so it stops accepting requests, and fulfills all the pending requests it accept()ed. And a new child is kicked off to serve all future incoming requests. Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Hi David, That sounds perfectbut I've got to work on Windows too. Do you know if there's a way to do it on Win? thanks! David |-+ | | David Rees | | | [EMAIL PROTECTED]| | | m | | || | | 05/25/2005 02:37 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| On 5/25/05, [EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. Have you seen if a graceful restart of Apache works for you? Graceful restarts of Apache have worked for me in the past to add new workers without dropping requests. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Graceful restart on Windows [was Re: Adding working dynamically with mod_jk status?]
After some more digging, it *appears* that apache -k restart WILL do a graceful restart of Apache2 on Windoze. Can anyone confirm this please? And are there any gotcha's to watch out for? Can someone explain exactly how this works? eg if I am in the middle of a chunk (or series) of work with a web browser and one of the tomcats, will it restart in the middle of that? cheers, David |-+ | | [EMAIL PROTECTED] | | || | | 05/31/2005 05:29 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| Hi David, That sounds perfectbut I've got to work on Windows too. Do you know if there's a way to do it on Win? thanks! David |-+ | | David Rees | | | [EMAIL PROTECTED]| | | m | | || | | 05/25/2005 02:37 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| On 5/25/05, [EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. Have you seen if a graceful restart of Apache works for you? Graceful restarts of Apache have worked for me in the past to add new workers without dropping requests. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Yes, it should be possible on Windows as well. You may have to invoke apache.exe manually on that platform, I am not familiar with Apache on Windows. Apache docs or a google search should tell you more. -Dave On 5/31/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: That sounds perfectbut I've got to work on Windows too. Do you know if there's a way to do it on Win? On 5/25/05, [EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. Have you seen if a graceful restart of Apache works for you? Graceful restarts of Apache have worked for me in the past to add new workers without dropping requests. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Graceful restart on Windows [was Re: Adding working dynamically with mod_jk status?]
On 5/31/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: After some more digging, it *appears* that apache -k restart WILL do a graceful restart of Apache2 on Windoze. Can anyone confirm this please? And are there any gotcha's to watch out for? Can someone explain exactly how this works? eg if I am in the middle of a chunk (or series) of work with a web browser and one of the tomcats, will it restart in the middle of that? On Unix, it will let any running threads/processes finish processing any existing requests before killing them. Replacment threads/processes will be started up to take all new requests from that point on. Best to test it to make sure, I have not tested it personally on Windows or any other threaded Apache MPM. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Well it should be the final goal. A way to add a worker dynamically and also if possible an URI to worker. As such we could have a 24/24 7/7 dynamically manageable tomcat farm routeur (if we see the HTTP server as such) 2005/5/24, Mladen Turk [EMAIL PROTECTED]: [EMAIL PROTECTED] wrote: Any ideas or recommendations on this? Adding workers would be tricky because if member of load balancer it has to be known at startup time so that shared memory slot can be allocated. The only solution would be to edit the workers.properties file and then forcing the Apache to restart. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. thanks! David |-+ | | Mladen Turk | | | [EMAIL PROTECTED]| | | | | || | | 05/24/2005 02:55 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| [EMAIL PROTECTED] wrote: Any ideas or recommendations on this? Adding workers would be tricky because if member of load balancer it has to be known at startup time so that shared memory slot can be allocated. The only solution would be to edit the workers.properties file and then forcing the Apache to restart. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
[EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? It will work if you know the hostname and the port that new server will have in advance. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
On 5/25/05, [EMAIL PROTECTED] wrote: Is this still true if we were to define extra workers that are marked as disabled at startup? Could we then point them to any new servers as they are added and enable them without a restart? I know it's not very clean, but would it work? We'd *really* like to find a way around having to force a restart. Have you seen if a graceful restart of Apache works for you? Graceful restarts of Apache have worked for me in the past to add new workers without dropping requests. -Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Any ideas or recommendations on this? cheers, David |-+ | | [EMAIL PROTECTED] | | || | | 05/23/2005 04:46 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| Hi Mladen, Sure...we have a system that uses multiple Tomcats (with Apache/mod_jk upfront, of course). We would like to make it easy for the user to add another server to the mix. Hence, we'd like to add the new worker to the Apache config programmatically (we'd like to be able to delete them too, if they cut down the number of servers they're using. I think we can just stop it using the status app.) Would it be easy to add to the status code? Comments? cheers, David |-+ | | Mladen Turk | | | [EMAIL PROTECTED]| | | | | || | | 05/23/2005 04:31 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| [EMAIL PROTECTED] wrote: Hi, Is there any way in the current implementatio to **add** a new worker (for a new Tomcat instance) dynamically? Using mod_jk status? Another way? No. Can you elaborate why would you need such a feature? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
[EMAIL PROTECTED] wrote: Any ideas or recommendations on this? Adding workers would be tricky because if member of load balancer it has to be known at startup time so that shared memory slot can be allocated. The only solution would be to edit the workers.properties file and then forcing the Apache to restart. Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Adding working dynamically with mod_jk status?
Hi, Is there any way in the current implementatio to **add** a new worker (for a new Tomcat instance) dynamically? Using mod_jk status? Another way? cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
[EMAIL PROTECTED] wrote: Hi, Is there any way in the current implementatio to **add** a new worker (for a new Tomcat instance) dynamically? Using mod_jk status? Another way? No. Can you elaborate why would you need such a feature? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding working dynamically with mod_jk status?
Hi Mladen, Sure...we have a system that uses multiple Tomcats (with Apache/mod_jk upfront, of course). We would like to make it easy for the user to add another server to the mix. Hence, we'd like to add the new worker to the Apache config programmatically (we'd like to be able to delete them too, if they cut down the number of servers they're using. I think we can just stop it using the status app.) Would it be easy to add to the status code? Comments? cheers, David |-+ | | Mladen Turk | | | [EMAIL PROTECTED]| | | | | || | | 05/23/2005 04:31 | | | PM | | | Please respond to| | | Tomcat | | | Developers List | | || |-+ ---| | | | To: Tomcat Developers List tomcat-dev@jakarta.apache.org | | cc: | | Subject: Re: Adding working dynamically with mod_jk status? | ---| [EMAIL PROTECTED] wrote: Hi, Is there any way in the current implementatio to **add** a new worker (for a new Tomcat instance) dynamically? Using mod_jk status? Another way? No. Can you elaborate why would you need such a feature? Regards, Mladen. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]