tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Tomcat on macOS
Date Sat, 20 May 2017 23:22:29 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Israel,

On 5/20/17 8:56 AM, Israel Timoteo wrote:
> 2)There is one Tomcat instance per server and all Tomcats are in a 
> cluster, having HTTPD in front'> -on HTTPD, mod_jk is used> -one
> cluster per each location, multicast
is used - I do recall a
> presentation where not using multicast was mentioned - I need to 
> check my notes
Unicast is possible, but much less flexible.

> 3) The application is developed by a third-party company (B) and 
> uploaded to one of my non-production servers
> 
> 4) When an application needs to be deployed, I connect (ssh) to
> the target server(s) and from there, I use scp to get the war file
> from the non-production server and place the war file into a
> particular directory; then, I have a script that moves the war file
> to $CATALINA_BASE and do some additional validations

You ought to be able to scp to the right place from outside the box.
If you can do that, just scp from the deployment server (just pick
one) to each of the others. Be sure to check to see which servers
successfully deployed the application. If any of the servers fail to
deploy the new version, "downgrade" the servers that succeeded by
"upgrading" them to the old version (which, presumably, will
successfully deploy the old version).

> -Autodeploy and Parallel deployment are used> -I explored the
> FarmWebDeployer option years ago but had the war file removed from
> the cluster when the master node was down… maybe I had a wrong
> configuration then.. so I will need to check this option again and
> experiment

For my money, if you've got a cluster I'd try to use the FarmWebDeployer
.

We had some conversations about the FarmWebDeployer this week at
TomcatCon. This component has always had an air of untrustworthyness
to it, and not many people have tried it for one reason or another.

Honestly, I'd like to have MORE people use it because then it could
get some real-world usage, and some real-world feedback. If it does
indeed work and is robust, then that's great. Otherwise, we (Tomcat)
should either fix the bugs and make it useful or kill it off so nobody
relies upon it.

So if you are willing to plough-through it, please do so and we'll try
to provide the best support we can.

> 5) As per the JAVA_OPTS… -I use it for “-server
> -Dfile.encoding=UTF-8” -It seems that I can add “-server
> -Dfile.encoding=UTF-8” to
CATALINA_OPTS; I will change and test it.
Macos is 64-bit and you almost certainly have a 64-bit JVM. 64-bit
JVMs are *always* running in "server mode" so that's probably not
necessary.

There are other environment variables you can use to set the file
encoding, but an explicit system property is probably the best way to
do it.

In your case, CATALINA_OPTS or JAVA_OPTS would be fine.

Most people use system properties for setting the size of their heaps.
They set JAVA_OPTS to "-Xmx16G" and never realize that this means that
"catalina.sh stop" will launch a JVM with a 16 GiB heap just to send
the "shutdown" command to Tomcat.

> I have an additional question:
> 
> 1) Would there be any recommendations for not having one Tomcat 
> instance per physical server?

I typically run 4 separate applications, and I run them in completely
separate JVMs on the same server. I do this mostly to make deployments
easier and more flexible... I can test/deploy each application
separately and upgrade either them, their supporting Tomcats, or their
supporting JVMs separately from the rest.

Leon is correct that, given a set of reliable web applications, you
should be able to run them all in one large JVM. Theoretically,
running a single JVM will give you the best resource utilization since
you don't pay a penalty for separate memory spaces for the same kinds
of things (i.e. the JVM doesn't have to take up 2x memory because of
the two processes running). In reality, (a) applications have bugs,
(b) JVMs have bugs, (c) threads sometimes have stack-overflows, and
(d) JVMs use shared memory to avoid huge amounts of memory for each
independent JVM.

I find that I get more flexibility from a multi-JVM deployment even
though my applications seem to be very well-behaved and I generally
deploy everything on the same Tomcat version and JVM version.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlkgz7MACgkQHPApP6U8
pFilCA//c5KIC9nOyZ9cc3PU4RmM12HtmXeH+QSd+cDvao5MWtLWOMXoJw98FhMb
pVZ5ZTCywn6siusujnG+OHQbL866ubJTmk6A76ey4XErSPHUDtNZrmPFphwFM7pD
tbTrQTXG0MyGLLFApKyaHlDUdKARqg2qu2gtxTrtPVvtfADJpLdF6yl9dYf5qFuO
b01tCSGfn+jvy39wsYhKw+yItcRjhoDY8dEGfgVGSysuNTmlhGtp1W9Gu8y4v/K2
BEPrMMfFcEZxUvEw60lGfmeuMAgkftgLnw/CwZ/7YJrfikgIgR++psvq0KXcGefd
AzEQDoQASX7GEqZd2T4hlIIIXIbRlJBZIEoxnAxVXVc6p0S9zP+GSesZxW5A7OwC
CogexBG87N/DjQs4S5QCkzfC06kBauZKLvsKZ/3zQnaOwkMyjk1xD7Pkx8LtXBuY
MjqpFehg8kowu0Fhln0LYUcK1M2hqkarYcfgFrazQZd9jpm2IGZnY0ZgcKpuCgFw
Zgbz5PqsOY35ztNd2AKAJW80N/nSz06a39MO5NpBgmhxcYCrsOCEps/m+Jd2GfM5
r1K2PYq4aOw41IFj/QFHuzcJ7gb15pFTnJJFVVgtE4U1QNTsUu+oaldp4dSaY3ON
/4CM55L5QhQY3GIo16PNxl7XU3mVLo/eWQBPMhaqwpNnx2Eik4Y=
=MQmq
-----END PGP SIGNATURE-----

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


Mime
View raw message