Re: Advice for Hosting Many Individual Webapps?
My solution for this is not elegant. I run 8 apps on one instance of Tomcat and it will be growing to 12 soon. All of those apps are set with autoReload set to true. When I need to update something I manually copy the individual class or JSP file to the proper folder to over write the existing ones. So I never need to take Tomcat down unless I update a library in commons/lib which is almost never. I also when in a hurry use the deployer to restart individual web apps so they do not all go down. This works to a point but has the obvious pitfalls. First Tomcat is wasting processing time constantly checking to see if it should reload any of the modules. And second if I update a class file or JSP page that depends on another updated class or JSP file I forgot to copy over then that app will throw exceptions like crazy. It also means I have to manually set the config files like the context.xml files which is very error pron. Any one else have other ideas? -Original Message- From: Seth Ladd [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 3:12 PM To: Tomcat Users List Subject: Advice for Hosting Many Individual Webapps? Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: Run the HTTP connector on port 8080. Forward port 80 to port 8080. To re-start the system: edit the server.xml and run the HTTP connector on port 7080 Change the shutdown port to 8006 Start tomcat, and wait till it comes up. Re-run the firewall script to forward port 80 to port 7080. Stop the instance running on port 7080. The downside is that any active sessions get bounced and have to re-login. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Seth Ladd [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 3:12 PM To: Tomcat Users List Subject: Advice for Hosting Many Individual Webapps? Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Seth Ladd wrote: The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. What about clustering? You could move users to one node of the cluster, update apps in the second one, and then the opposite. Move users to the second node, update the first one and finally allow users to work with two (or more) nodes. -- Mikolaj Rydzewski [EMAIL PROTECTED] Becomo S.A. tel. (12) 2927104 smime.p7s Description: S/MIME Cryptographic Signature
RE: Advice for Hosting Many Individual Webapps?
we used to just schedule updates and let all our staff know there would be a small amount of downtime (for our intranet) but you can't do this on external production servers, so you need to go with either load balancing/clustering that allows you to close a node down *while also* letting sessions complete (e.g BigIP I think may do this). we have a semi-solution using mod_jk's load balancing/sticky sessions. Although closing a node does not wait until sessions are complete, mod_jk still detects the failed node and passes over to the next node gracefully. it's a 1/2 way house to a full solution that you can implement right away. for graceful close down (i.e sessions completing) you need something like BigIP or a commercial application server like BEA which does this for you. I really wish support for hot deployment got sorted out in Tomcat/J2EE servers in general. Although I am a J2EE die-hard I used C# .NET recently for a project and it beats the hell out of J2EE deployment, if we're not careful this will be a big win for .NET. -Original Message- From: Brian Cook [mailto:[EMAIL PROTECTED] Sent: 18 August 2005 15:55 To: Tomcat Users List Subject: Re: Advice for Hosting Many Individual Webapps? I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: Run the HTTP connector on port 8080. Forward port 80 to port 8080. To re-start the system: edit the server.xml and run the HTTP connector on port 7080 Change the shutdown port to 8006 Start tomcat, and wait till it comes up. Re-run the firewall script to forward port 80 to port 7080. Stop the instance running on port 7080. The downside is that any active sessions get bounced and have to re-login. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Seth Ladd [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 3:12 PM To: Tomcat Users List Subject: Advice for Hosting Many Individual Webapps? Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
The net effect is that users have to re-login, but there is no down time. They get bounced, but can immediately log back in. Right now, startup time for my hosted machine is running in the area of 5 minutes. So, I'm eliminating a 5 minute startup cycle. I'm running 60 virtual hosts on one machine (P3 600). I'll be moving to a P4 3.0GHz this weekend, but I hope to get up to 200 virtual hosts per machine. Any way you cut it, startup time is a killer. On Thursday 18 August 2005 08:54, Brian Cook wrote: I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Sorry still not following. If Tomcat is being restarted how do you not have start up time? Is it that you have two instances of Tocmat and you are having the firewall just point to one instance while you bounce the second? If so is there an advantage to doing that over clustering? George L. Sexton wrote: The net effect is that users have to re-login, but there is no down time. They get bounced, but can immediately log back in. Right now, startup time for my hosted machine is running in the area of 5 minutes. So, I'm eliminating a 5 minute startup cycle. I'm running 60 virtual hosts on one machine (P3 600). I'll be moving to a P4 3.0GHz this weekend, but I hope to get up to 200 virtual hosts per machine. Any way you cut it, startup time is a killer. On Thursday 18 August 2005 08:54, Brian Cook wrote: I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian Cook Digital Services Analyst Print Time Inc. [EMAIL PROTECTED] 913.345.8900 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Mikolaj Rydzewski wrote: Seth Ladd wrote: The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. What about clustering? You could move users to one node of the cluster, update apps in the second one, and then the opposite. Move users to the second node, update the first one and finally allow users to work with two (or more) nodes. Yes, but then how to do you handle class evolution for objects in the session? For example, if I'm clustering two Tomcats, they are sharing Session state. If I upgrade one node in the cluster, and possibly change a class definition of an object that gets stored in the session, I will now have two definitions of the same object (one for the old cluster node and one for the new cluster node). I think there will be serialVersionUID issues there. Advice on how to handle that? Thanks! Seth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Allistair Crossley wrote: we used to just schedule updates and let all our staff know there would be a small amount of downtime (for our intranet) but you can't do this on external production servers, so you need to go with either load balancing/clustering that allows you to close a node down *while also* letting sessions complete (e.g BigIP I think may do this). we have a semi-solution using mod_jk's load balancing/sticky sessions. Although closing a node does not wait until sessions are complete, mod_jk still detects the failed node and passes over to the next node gracefully. it's a 1/2 way house to a full solution that you can implement right away. for graceful close down (i.e sessions completing) you need something like BigIP or a commercial application server like BEA which does this for you. I really wish support for hot deployment got sorted out in Tomcat/J2EE servers in general. Although I am a J2EE die-hard I used C# .NET recently for a project and it beats the hell out of J2EE deployment , if we're not careful this will be a big win for .NET. The hot deployment issues isn't a Tomcat issue, or a J2EE issue. It's a fundamental flaw in the JVM. There is just no way to explicitly destroy a classloader (the main cause of OOM exceptions when constantly redeploying apps). Until either we're able to just destroy a classloader, or have isolates/MVM available, we're stuck in this deployment mess. I agree, .NET is way better for developing and deploying apps. And deployment couldn't get more simple that PHP (just copy them over). Why does it have to be so hard for Java? Until Sun wakes up and realizes the JVM wasn't made to host multiple applications, and then fixes it, we're going to be stuck with the current state of things. For instance, having to run each webapp in a separate Tomcat just to minimize downtime for all apps is pretty crazy. The clustering solution seems possible, except I'm worried about two different versions of a class ending up in the session (and this causing serialVersionUID issues). Seth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
.NET and PHP may have better development/deployment environments, but quite frankly I would rather use Java than C# or PHP to develop web applications. Just look at the robust Java open-source frameworks that exist (i.e. Spring, Turbine, Struts, JSF) just to name a few. Also, .NET applications are not multi-platform. There is just no comparison to Java - J2EE rules! - Asad On Thu, 18 Aug 2005, Seth Ladd wrote: Allistair Crossley wrote: we used to just schedule updates and let all our staff know there would be a small amount of downtime (for our intranet) but you can't do this on external production servers, so you need to go with either load balancing/clustering that allows you to close a node down *while also* letting sessions complete (e.g BigIP I think may do this). we have a semi-solution using mod_jk's load balancing/sticky sessions. Although closing a node does not wait until sessions are complete, mod_jk still detects the failed node and passes over to the next node gracefully. it's a 1/2 way house to a full solution that you can implement right away. for graceful close down (i.e sessions completing) you need something like BigIP or a commercial application server like BEA which does this for you. I really wish support for hot deployment got sorted out in Tomcat/J2EE servers in general. Although I am a J2EE die-hard I used C# .NET recently for a project and it beats the hell out of J2EE deployme! nt , if we're not careful this will be a big win for .NET. The hot deployment issues isn't a Tomcat issue, or a J2EE issue. It's a fundamental flaw in the JVM. There is just no way to explicitly destroy a classloader (the main cause of OOM exceptions when constantly redeploying apps). Until either we're able to just destroy a classloader, or have isolates/MVM available, we're stuck in this deployment mess. I agree, .NET is way better for developing and deploying apps. And deployment couldn't get more simple that PHP (just copy them over). Why does it have to be so hard for Java? Until Sun wakes up and realizes the JVM wasn't made to host multiple applications, and then fixes it, we're going to be stuck with the current state of things. For instance, having to run each webapp in a separate Tomcat just to minimize downtime for all apps is pretty crazy. The clustering solution seems possible, except I'm worried about two different versions of a class ending up in the session (and this causing serialVersionUID issues). Seth - 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: Advice for Hosting Many Individual Webapps?
To re-start tomcat, I start a second instance running on a different port and after the second instance is running, change the port forwarding to activate it. If so is there an advantage to doing that over clustering? It's a simple configuration that only requires one machine. As nice as clustering sounds, it's not as useful as people think. Two areas where clustering won't work: Application upgrade that requires database structure change. Application upgrade that mades the serialized version of the properties incompatible from one version to the next. Another problem for me with clustering is that it seems to require an external director that would balance the requests across the host. If this is mod_jk and Apache, that's pretty ungainly if you are running a hosting operation with 200 virtual hosts. If it's an external load balance, that's a third piece of hardware. On Thursday 18 August 2005 10:15, Brian Cook wrote: Sorry still not following. If Tomcat is being restarted how do you not have start up time? Is it that you have two instances of Tocmat and you are having the firewall just point to one instance while you bounce the second? If so is there an advantage to doing that over clustering? George L. Sexton wrote: The net effect is that users have to re-login, but there is no down time. They get bounced, but can immediately log back in. Right now, startup time for my hosted machine is running in the area of 5 minutes. So, I'm eliminating a 5 minute startup cycle. I'm running 60 virtual hosts on one machine (P3 600). I'll be moving to a P4 3.0GHz this weekend, but I hope to get up to 200 virtual hosts per machine. Any way you cut it, startup time is a killer. On Thursday 18 August 2005 08:54, Brian Cook wrote: I think I missed something here. Are you not still bouncing Tomcat here? If so isnt the service still going down? What is the benifit of changign the ports around? I have a feeling I missed something in the expliation. George Sexton wrote: The technique I use is this: - 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: Advice for Hosting Many Individual Webapps?
Asad Habib wrote: .NET and PHP may have better development/deployment environments, but quite frankly I would rather use Java than C# or PHP to develop web applications. Just look at the robust Java open-source frameworks that exist (i.e. Spring, Turbine, Struts, JSF) just to name a few. Also, .NET applications are not multi-platform. There is just no comparison to Java - J2EE rules! No doubt, and this isn't about which rules more. This is a frank discussion regarding issues of hosting many webapps, looking for a real solution. I was merely trying to illustrate how high the bar has been set, and Java should aspire to be as easy /to deploy/ as PHP. It's certainly more powerful. Seth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Advice for Hosting Many Individual Webapps?
Hi, I very often deploy client's applications in multiple tomcat instances. It is normal and each application does not affect another. You just need a strong multiprocessor server with a lot of memory to sustain the last :) The only difference is that I often configure a separate apache instance for each tomcat instance. But one apache is also fine. I find this setup very comfortable when it comes to updating the application code or just restarting an application. Also, when one tomcat crashes, others run just fine. A tip here is to write/rewrite startup script so that it handles multiple instances of tomcat. It is also a good idea to create an environment profile file for each instance where you define stuff like JAVA_HOME or JAVA_OPTS for each instance separatelly and store it with the configuration. The development expense may be unneccessary if you only have one setup like that. I hope you are using the $CATALINA_HOME and $CATALINA_BASE variables to separate binaries from runtime/configuration files of each instance and you're not copying the whole tomcat tree. Think about file and process ownerships when web applications belong to different owners. If you want to ensure reliability then clone the machine and put a redirector in front of both. It scales very well and the user impact in case of trouble is not 100%. --Radek W. Seth Ladd wrote: Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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: Advice for Hosting Many Individual Webapps?
The technique I use is this: Run the HTTP connector on port 8080. Forward port 80 to port 8080. To re-start the system: edit the server.xml and run the HTTP connector on port 7080 Change the shutdown port to 8006 Start tomcat, and wait till it comes up. Re-run the firewall script to forward port 80 to port 7080. Stop the instance running on port 7080. The downside is that any active sessions get bounced and have to re-login. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 -Original Message- From: Seth Ladd [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 16, 2005 3:12 PM To: Tomcat Users List Subject: Advice for Hosting Many Individual Webapps? Hello, We are finding outselves hosting more and more individual webapps, all running on Tomcat 5.5.9 w/ JDK 1.5. Each of these webapps is developed and deployed on a separate schedule, and the number and frequency of app deployments is increasing. The frequency is so much that the uptime of all of our applications is affected as we continually take down Tomcat servers in production to deploy a new application (or new version of the application). Because hot deploy does not work (the old favorite OOM error w/ too many redeploys), we bounce the Tomcat server for every redeploy. To avoid taking down all of our applications when we need to redeploy a single app, we've begun to deploy each application to their own Tomcat instance. All of these instances are fronted by a single Apache server handling vhosts, logging, etc. We're just curious how common this setup really is. We know we are in an uncommon position, with so many webapps (approaching 20, and growing very fast). We don't want to put all our eggs in one basket, so to speak, so we've begun to split out individual tomcat instances. Anyone else have to handle numerous webapps, with frequent deploys, and have to keep uptime for all apps as high as possible? We hesitate to put all webapps in one tomcat, because to deploy one app means we have to take down all of our apps. This is becoming unacceptable. (not to mention that a memory leak in one app will bring down all the apps living in that tomcat instance) Any tips or tricks would be really appreciated. Or pointers to previous material (I've found some, but nothing that jumped out at me). Thanks very much in advance, Seth - 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]