You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Braun <br...@gmail.com> on 2011/05/09 06:17:17 UTC

High Availability in Tomcat?

Hi,

I'm about to launch a service on the internet, using Tomcat 7. This service
should be available 24x7, it should never be unavailable (or virtually
never). However, I will definitely be improving and correcting my app
frequently, so I will have to republish the WAR file very often. Not even
considering the fact that my app has leaking problems (that's another story)
and therefore I will have to restart Tomcat itself, republishing the app
will make it unavailable for at least 10 seconds while I do it.
I'm thinking that I need to create a Tomcat Cluster. Is that the way to go?
Any opinions?

Another idea would be to have two tomcat installations, and to change the IP
my domain points to, to the IP that goes to that other Tomcat instance. But
changing the IP takes some time and I would have to wait until I think that
the DNS servers have updates the new IP, that would be slow and unreliable.

Thanks in advance,

Brian

Re: High Availability in Tomcat?

Posted by הילה <hi...@gmail.com>.
I'll try.. thanks :]


2011/5/11 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> הילה,
>
> On 5/11/2011 3:10 PM, הילה wrote:
> > I've read this presentation, but I'm a system engineer, not an
> application
> > programmer.. so it didn't help me much. i'm trying to help the
> application
> > guys out, which for now doesn't think it's a leak from the application..
>
> Then send the presentation to them. :)
>
> > so.. could you please explain how can it be checked?..
>
> You basically need a memory profiler. I'm sure you can use jhat and some
> knocked-up Perl script to find it, too, but looking at things
> graphically is just sooo much nicer.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3K3/UACgkQ9CaO5/Lv0PAP+ACgoamQwTPMVWsyoa2yvmcihjcP
> em0An261gZ2h4jrNhg2kwhMrTHQRxvZU
> =STcD
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

הילה,

On 5/11/2011 3:10 PM, הילה wrote:
> I've read this presentation, but I'm a system engineer, not an application
> programmer.. so it didn't help me much. i'm trying to help the application
> guys out, which for now doesn't think it's a leak from the application..

Then send the presentation to them. :)

> so.. could you please explain how can it be checked?..

You basically need a memory profiler. I'm sure you can use jhat and some
knocked-up Perl script to find it, too, but looking at things
graphically is just sooo much nicer.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3K3/UACgkQ9CaO5/Lv0PAP+ACgoamQwTPMVWsyoa2yvmcihjcP
em0An261gZ2h4jrNhg2kwhMrTHQRxvZU
=STcD
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by הילה <hi...@gmail.com>.
I've read this presentation, but I'm a system engineer, not an application
programmer.. so it didn't help me much. i'm trying to help the application
guys out, which for now doesn't think it's a leak from the application..
so.. could you please explain how can it be checked?..

Thanks
Hila


2011/5/11 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> הילה,
>
> On 5/10/2011 4:45 PM, הילה wrote:
> > 2011/5/10 Christopher Schultz <ch...@christopherschultz.net>:
> >>
> >> "You should check to see if your webapp is leaky across webapp restarts
> >> (with Tomcat continuing to run) because you could bringing-down the JVM
> >> if your webapp does not undeploy cleanly /and/ it's got a memory leak."
> >
> > How can it be checked?
>
>
> http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3KlZ0ACgkQ9CaO5/Lv0PBMawCdGL1zUYa9EqQdboEJIYt+u5K6
> kjEAmwbfG16QckBarMMtiqbbJDcxtX3Z
> =oZIa
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

הילה,

On 5/10/2011 4:45 PM, הילה wrote:
> 2011/5/10 Christopher Schultz <ch...@christopherschultz.net>:
>>
>> "You should check to see if your webapp is leaky across webapp restarts
>> (with Tomcat continuing to run) because you could bringing-down the JVM
>> if your webapp does not undeploy cleanly /and/ it's got a memory leak."
> 
> How can it be checked?

http://people.apache.org/~markt/presentations/2010-11-04-Memory-Leaks-60mins.pdf

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3KlZ0ACgkQ9CaO5/Lv0PBMawCdGL1zUYa9EqQdboEJIYt+u5K6
kjEAmwbfG16QckBarMMtiqbbJDcxtX3Z
=oZIa
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by הילה <hi...@gmail.com>.
"You should check to see if your webapp is leaky across webapp restarts
(with Tomcat continuing to run) because you could bringing-down the JVM
if your webapp does not undeploy cleanly /and/ it's got a memory leak."

How can it be checked?



2011/5/10 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mark,
>
> On 5/9/2011 9:53 AM, Mark Thomas wrote:
> > On 09/05/2011 14:45, Brian Braun wrote:
> >> Hey, that is great! I had never noticed that new feature! But the
> >> documentation is so scarse, it hardly explains what is it about. But I
> think
> >> that will solve my redeployment issue   :-)
> >>
> >> But I still need to think about hig availabilty when Tomcat itself
> crashes,
> >> or when I restart it. I guess I need clustering, but the documentation
> is so
> >> scarse and confussing......
> >
> > The documentation is certainly brief and to the point. If you have
> > specific questions, please ask them. It should also be consistent. If
> > there are things that appear to be confusing tell us what they are.
> >
> > In Tomcat terminology, clustering == session replication. You can do
> > load-balancing without Tomcat clustering.
> >
> >From what you have written, you need load-balancing but not clustering.
>
> +1
>
> You don't need session replication, failover, etc... you just need a
> single request to (nearly) always hit a running server and return a
> valid response.
>
> Apache httpd + mod_jk (or mod_proxy_ajp or mod_proxy_http) + multiple
> Tomcats should do the trick. Feel free to layer parallel deployment on
> top of that, though with your requirements and an lb the parallel
> development doesn't really buy you anything.
>
> You should check to see if your webapp is leaky across webapp restarts
> (with Tomcat continuing to run) because you could bringing-down the JVM
> if your webapp does not undeploy cleanly /and/ it's got a memory leak.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3Jgv8ACgkQ9CaO5/Lv0PDfowCeP0R+7tuqM4DL2J1Jo9k+fyzl
> 3pQAnA2DNg9OsMt0bKeDikcNvs/lwzxj
> =5CIi
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

On 5/11/2011 2:24 PM, Brian Braun wrote:
> First, I will implement the parallel deployment, so my redeployments wont
> cause unavailability. Then, with a little bit of time and as soon as I have
> two separate Tomcats and a load balancer, I will forget about the parallel
> deployment because, as you said, the other solution is better and helps me
> with the redeployment as well.

Note that there's nothing stopping you from running two separate Tomcat
instances on the same physical machine just for this purpose. You aren't
improving performance at all, but you are gaining the ability to
re-deploy with no downtime.

> I do have leaks, but fortunately they happen just when I stop the app, but
> not when it is already running. I mean, it doesn't get worse with time.

Good to know. When you DO have multiple Tomcat instances, you'll of
course be able to bring-down the entire JVM during a re-deployment to be
absolutely sure there is no wasted memory laying around.

Good luck,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3K36oACgkQ9CaO5/Lv0PCIAQCgmxdcBWrTmXVUkfFoaZ34K9jW
VhcAnjnYcTfrbojf4sMHml4SGSaU4/UZ
=NVjg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hi Chris,

I agree with you.
First, I will implement the parallel deployment, so my redeployments wont
cause unavailability. Then, with a little bit of time and as soon as I have
two separate Tomcats and a load balancer, I will forget about the parallel
deployment because, as you said, the other solution is better and helps me
with the redeployment as well.

I do have leaks, but fortunately they happen just when I stop the app, but
not when it is already running. I mean, it doesn't get worse with time.



On Tue, May 10, 2011 at 1:25 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Mark,
>
> On 5/9/2011 9:53 AM, Mark Thomas wrote:
> > On 09/05/2011 14:45, Brian Braun wrote:
> >> Hey, that is great! I had never noticed that new feature! But the
> >> documentation is so scarse, it hardly explains what is it about. But I
> think
> >> that will solve my redeployment issue   :-)
> >>
> >> But I still need to think about hig availabilty when Tomcat itself
> crashes,
> >> or when I restart it. I guess I need clustering, but the documentation
> is so
> >> scarse and confussing......
> >
> > The documentation is certainly brief and to the point. If you have
> > specific questions, please ask them. It should also be consistent. If
> > there are things that appear to be confusing tell us what they are.
> >
> > In Tomcat terminology, clustering == session replication. You can do
> > load-balancing without Tomcat clustering.
> >
> >From what you have written, you need load-balancing but not clustering.
>
> +1
>
> You don't need session replication, failover, etc... you just need a
> single request to (nearly) always hit a running server and return a
> valid response.
>
> Apache httpd + mod_jk (or mod_proxy_ajp or mod_proxy_http) + multiple
> Tomcats should do the trick. Feel free to layer parallel deployment on
> top of that, though with your requirements and an lb the parallel
> development doesn't really buy you anything.
>
> You should check to see if your webapp is leaky across webapp restarts
> (with Tomcat continuing to run) because you could bringing-down the JVM
> if your webapp does not undeploy cleanly /and/ it's got a memory leak.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3Jgv8ACgkQ9CaO5/Lv0PDfowCeP0R+7tuqM4DL2J1Jo9k+fyzl
> 3pQAnA2DNg9OsMt0bKeDikcNvs/lwzxj
> =5CIi
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 5/9/2011 9:53 AM, Mark Thomas wrote:
> On 09/05/2011 14:45, Brian Braun wrote:
>> Hey, that is great! I had never noticed that new feature! But the
>> documentation is so scarse, it hardly explains what is it about. But I think
>> that will solve my redeployment issue   :-)
>>
>> But I still need to think about hig availabilty when Tomcat itself crashes,
>> or when I restart it. I guess I need clustering, but the documentation is so
>> scarse and confussing......
> 
> The documentation is certainly brief and to the point. If you have
> specific questions, please ask them. It should also be consistent. If
> there are things that appear to be confusing tell us what they are.
> 
> In Tomcat terminology, clustering == session replication. You can do
> load-balancing without Tomcat clustering.
> 
>From what you have written, you need load-balancing but not clustering.

+1

You don't need session replication, failover, etc... you just need a
single request to (nearly) always hit a running server and return a
valid response.

Apache httpd + mod_jk (or mod_proxy_ajp or mod_proxy_http) + multiple
Tomcats should do the trick. Feel free to layer parallel deployment on
top of that, though with your requirements and an lb the parallel
development doesn't really buy you anything.

You should check to see if your webapp is leaky across webapp restarts
(with Tomcat continuing to run) because you could bringing-down the JVM
if your webapp does not undeploy cleanly /and/ it's got a memory leak.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3Jgv8ACgkQ9CaO5/Lv0PDfowCeP0R+7tuqM4DL2J1Jo9k+fyzl
3pQAnA2DNg9OsMt0bKeDikcNvs/lwzxj
=5CIi
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hi Mark,

Thanks a lot for your response.
I will certaily start using the parallel deployment immediately, that seems
to be easy and will solve the issue about deploying new WARs frequently.
Then I will implement a load balancer, in order to have two separate Tomcat
instances, that will solve more critical situations.



On Mon, May 9, 2011 at 8:53 AM, Mark Thomas <ma...@apache.org> wrote:

> On 09/05/2011 14:45, Brian Braun wrote:
> > Hey, that is great! I had never noticed that new feature! But the
> > documentation is so scarse, it hardly explains what is it about. But I
> think
> > that will solve my redeployment issue   :-)
> >
> > But I still need to think about hig availabilty when Tomcat itself
> crashes,
> > or when I restart it. I guess I need clustering, but the documentation is
> so
> > scarse and confussing......
>
> The documentation is certainly brief and to the point. If you have
> specific questions, please ask them. It should also be consistent. If
> there are things that appear to be confusing tell us what they are.
>
> In Tomcat terminology, clustering == session replication. You can do
> load-balancing without Tomcat clustering.
>
> From what you have written, you need load-balancing but not clustering.
>
> Mark
>
> >
> >
> >
> > On Mon, May 9, 2011 at 7:13 AM, Konstantin Kolinko
> > <kn...@gmail.com>wrote:
> >
> >> 2011/5/9 Brian Braun <br...@gmail.com>:
> >>> republishing the app
> >>> will make it unavailable for at least 10 seconds while I do it.
> >>
> >> Take a look at the Parallel Deployment feature in Tomcat 7
> >> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
> >>
> >> Best regards,
> >> Konstantin Kolinko
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Mark Thomas <ma...@apache.org>.
On 09/05/2011 14:45, Brian Braun wrote:
> Hey, that is great! I had never noticed that new feature! But the
> documentation is so scarse, it hardly explains what is it about. But I think
> that will solve my redeployment issue   :-)
> 
> But I still need to think about hig availabilty when Tomcat itself crashes,
> or when I restart it. I guess I need clustering, but the documentation is so
> scarse and confussing......

The documentation is certainly brief and to the point. If you have
specific questions, please ask them. It should also be consistent. If
there are things that appear to be confusing tell us what they are.

In Tomcat terminology, clustering == session replication. You can do
load-balancing without Tomcat clustering.

>From what you have written, you need load-balancing but not clustering.

Mark

> 
> 
> 
> On Mon, May 9, 2011 at 7:13 AM, Konstantin Kolinko
> <kn...@gmail.com>wrote:
> 
>> 2011/5/9 Brian Braun <br...@gmail.com>:
>>> republishing the app
>>> will make it unavailable for at least 10 seconds while I do it.
>>
>> Take a look at the Parallel Deployment feature in Tomcat 7
>> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hey, that is great! I had never noticed that new feature! But the
documentation is so scarse, it hardly explains what is it about. But I think
that will solve my redeployment issue   :-)

But I still need to think about hig availabilty when Tomcat itself crashes,
or when I restart it. I guess I need clustering, but the documentation is so
scarse and confussing......



On Mon, May 9, 2011 at 7:13 AM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2011/5/9 Brian Braun <br...@gmail.com>:
> > republishing the app
> > will make it unavailable for at least 10 seconds while I do it.
>
> Take a look at the Parallel Deployment feature in Tomcat 7
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hi Chris,

The easiest way is to deploy files with the name X##Y.war, where X is the
usual name you have been using ("ROOT", for example) and Y is any string
what should be alphabetically located after the previous ones you used. It
is as easy as that. You can achieve it doing this, without making changes to
the context.xml files, which maybe doesn't even exist in your case.
.

On Sat, May 14, 2011 at 7:40 AM, chris derham <ch...@derham.me.uk> wrote:

> >
> > > Take a look at the Parallel Deployment feature in Tomcat 7
> > > http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
> >
>
> Can someone explain how to do actually do this? I have read the docs at the
> link above, and think I understand that you have to manually craft a
> context.xml file for both v1 and v2 of the war files. However the
> documentation isn't that clear to me - perhaps we could add a "step 1, step
> 2" guide of actually how to do it.
>
> Before anyone says "well supply a patch", I am happy to - I just want to
> understand how to use the feature first
>
> Thanks
>
> Chris
>

Re: High Availability in Tomcat?

Posted by chris derham <ch...@derham.me.uk>.
>
> > Take a look at the Parallel Deployment feature in Tomcat 7
> > http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>

Can someone explain how to do actually do this? I have read the docs at the
link above, and think I understand that you have to manually craft a
context.xml file for both v1 and v2 of the war files. However the
documentation isn't that clear to me - perhaps we could add a "step 1, step
2" guide of actually how to do it.

Before anyone says "well supply a patch", I am happy to - I just want to
understand how to use the feature first

Thanks

Chris

Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hi Konstantin,

I have just read the manual regarding the parallel deployment and tested it.
IT IS A WONDERFUL FEATURE! And so easy to do!
At last my site won't stop every time I redeploy!

Thanks a lot for your advice, I wouldn't have noticed this new feature if
you hadn't told me to check it.



On Mon, May 9, 2011 at 7:13 AM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2011/5/9 Brian Braun <br...@gmail.com>:
> > republishing the app
> > will make it unavailable for at least 10 seconds while I do it.
>
> Take a look at the Parallel Deployment feature in Tomcat 7
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/5/9 Brian Braun <br...@gmail.com>:
> republishing the app
> will make it unavailable for at least 10 seconds while I do it.

Take a look at the Parallel Deployment feature in Tomcat 7
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by gu...@unina.it.
DNS update times are too long to trust on them
     If you want to have two installations, and direct users to
the one is working, you might have one IP address for the
machine that is in service at a given time, and switch that
address between the two machines as appropriate, NOT changing
the DNS, i.e., change the IP address of the Tomcat server.
                          Gustavo Avitabile

> On Mon, May 9, 2011 at 6:17 AM, Brian Braun <br...@gmail.com> wrote:
>> Hi,
>>
>> I'm about to launch a service on the internet, using Tomcat 7. This service
>> should be available 24x7, it should never be unavailable (or virtually
>> never). However, I will definitely be improving and correcting my app
>> frequently, so I will have to republish the WAR file very often. Not even
>> considering the fact that my app has leaking problems (that's another story)
>> and therefore I will have to restart Tomcat itself, republishing the app
>> will make it unavailable for at least 10 seconds while I do it.
>> I'm thinking that I need to create a Tomcat Cluster. Is that the way to go?
>> Any opinions?
>>
>> Another idea would be to have two tomcat installations, and to change the IP
>> my domain points to, to the IP that goes to that other Tomcat instance. But
>> changing the IP takes some time and I would have to wait until I think that
>> the DNS servers have updates the new IP, that would be slow and unreliable.
>>
>> Thanks in advance,
>>
>> Brian
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: High Availability in Tomcat?

Posted by Brian Braun <br...@gmail.com>.
Hi Leon,

My budget is scarse, so I definitely should go for a soft balancer. And
certainly I see now that a balancer is the way I need to go.
My app will be an IP address geolocator, so my clients wont be humans with
browsers, but systems with HTTP components. So is it not going to be
sessions/cookies, each request will be considered as a new visitor. That
said, my needs are easier because I dont need to think about sessions and
cookies and how to preserve them.

However, I have read another email with an altervative complementary idea:
Parallel deployment. That would solve my problem with downtimes with
redeployments!  It seems to be something new in Tomcat 7. That would help me
with the redeployment issue, while I still need a solution for availability
with a balancer and two Tomcat instances. (Tomcat clustering?)

Thanks!!!!

On Mon, May 9, 2011 at 5:03 AM, Leon Rosenberg <ro...@gmail.com>wrote:

> Hello,
>
> well, you provided not that many infos, but the usual way of doing
> this is to put multiple standalone tomcat instances behind a soft- or
> hardware loadbalancer (whatever your budget allows) and to make the
> app stateless, with cookie stickiness and failover.
> However, this will probably not make the site 100% available (which
> btw no site in the world is, not even google),
> since you will have at least node failure detection times (usually 3
> retries with 10 seconds timeout) and so on.
> However, you can reach 99,9X pretty easy with this scenario.
>
> regards
> Leon
>
> On Mon, May 9, 2011 at 6:17 AM, Brian Braun <br...@gmail.com> wrote:
> > Hi,
> >
> > I'm about to launch a service on the internet, using Tomcat 7. This
> service
> > should be available 24x7, it should never be unavailable (or virtually
> > never). However, I will definitely be improving and correcting my app
> > frequently, so I will have to republish the WAR file very often. Not even
> > considering the fact that my app has leaking problems (that's another
> story)
> > and therefore I will have to restart Tomcat itself, republishing the app
> > will make it unavailable for at least 10 seconds while I do it.
> > I'm thinking that I need to create a Tomcat Cluster. Is that the way to
> go?
> > Any opinions?
> >
> > Another idea would be to have two tomcat installations, and to change the
> IP
> > my domain points to, to the IP that goes to that other Tomcat instance.
> But
> > changing the IP takes some time and I would have to wait until I think
> that
> > the DNS servers have updates the new IP, that would be slow and
> unreliable.
> >
> > Thanks in advance,
> >
> > Brian
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: High Availability in Tomcat?

Posted by Leon Rosenberg <ro...@gmail.com>.
Hello,

well, you provided not that many infos, but the usual way of doing
this is to put multiple standalone tomcat instances behind a soft- or
hardware loadbalancer (whatever your budget allows) and to make the
app stateless, with cookie stickiness and failover.
However, this will probably not make the site 100% available (which
btw no site in the world is, not even google),
since you will have at least node failure detection times (usually 3
retries with 10 seconds timeout) and so on.
However, you can reach 99,9X pretty easy with this scenario.

regards
Leon

On Mon, May 9, 2011 at 6:17 AM, Brian Braun <br...@gmail.com> wrote:
> Hi,
>
> I'm about to launch a service on the internet, using Tomcat 7. This service
> should be available 24x7, it should never be unavailable (or virtually
> never). However, I will definitely be improving and correcting my app
> frequently, so I will have to republish the WAR file very often. Not even
> considering the fact that my app has leaking problems (that's another story)
> and therefore I will have to restart Tomcat itself, republishing the app
> will make it unavailable for at least 10 seconds while I do it.
> I'm thinking that I need to create a Tomcat Cluster. Is that the way to go?
> Any opinions?
>
> Another idea would be to have two tomcat installations, and to change the IP
> my domain points to, to the IP that goes to that other Tomcat instance. But
> changing the IP takes some time and I would have to wait until I think that
> the DNS servers have updates the new IP, that would be slow and unreliable.
>
> Thanks in advance,
>
> Brian
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org