You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Majors, Jeremy" <jm...@tribune.com> on 2013/07/05 17:24:06 UTC

Expected Delay when Switching to New Version of Application Using Parallel Deployment (Tomcat 7.0.27)

For a simple web application, what is the expected delay when switching to new version of an application when using the parallel deployment process?  I'm trying to do timings right now with a single Hello World JSP and sometimes there is a delay of up to 4 seconds when the new version of the application is deployed (running 5 users simultaneously using Jmeter with cookies turned off), but other times I don't see this behavior.  Does anyone know if it is expected for there to be a slight hiccup in response times when the applications are deployed via parallel deployment?  I understand that many applications will have initialization logic and that may cause a delay, but I'm wondering if I should expect tomcat to introduce a very small delay when switching from the old version to the new version and if so, how long should I expect that process to take.

Please let me know if I haven't been clear.

Thanks,
Jeremy

Re: Expected Delay when Switching to New Version of Application Using Parallel Deployment (Tomcat 7.0.27)

Posted by "Majors, Jeremy" <jm...@tribune.com>.
Thanks Chris for the suggestions.  At this point I think it will be good
enough for our needs.  Your comments have helped me understand the
process/inner-workings better.

Jeremy

On 7/11/13 10:39 AM, "Christopher Schultz" <ch...@christopherschultz.net>
wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>
>Jeremy,
>
>On 7/9/13 9:58 AM, Majors, Jeremy wrote:
>> On 7/8/13 10:52 PM, "Christopher Schultz"
>> <ch...@christopherschultz.net> wrote:
>> 
>> Jeremy,
>> 
>> On 7/5/13 11:24 AM, Majors, Jeremy wrote:
>>>>> For a simple web application, what is the expected delay
>>>>> when switching to new version of an application when using
>>>>> the parallel deployment process?  I'm trying to do timings
>>>>> right now with a single Hello World JSP and sometimes there
>>>>> is a delay of up to 4 seconds when the new version of the
>>>>> application is deployed (running 5 users simultaneously using
>>>>> Jmeter with cookies turned off), but other times I don't see
>>>>> this behavior.
>> 
>> How are you deploying the new version? Are you dropping another
>> WAR file into the webapps/ directory, or are you using the manager
>> webapp to deploy the new version?
>> 
>>> Our current deployment mechanism involves placing a new
>>> context.xml file in {tomcat.root}/conf/Catalina/localhost/ which
>>> has the docbase property set to an already exploded WAR.
>
>I suspect you are seeing the delay caused by Tomcat only
>periodically-polling for deployment descriptor updates: they are not
>instantaneous. I think you can adjust the polling time by setting the
>backgroundProcessorDelay attribute on your <Host> element. (I looked
>at the code to determine if this was true, but I can't seem to prove
>it. I don't see any other options that could affect this polling-time,
>so I suspect this is the case).
>
>Note that reducing the backgroundProcessorDelay from the default of 10
>may lead to performance problems, as a lot of resources are scanned to
>see if any of them has changed.
>
>If you want to allow for near-instantaneous redeployment, you should
>use the manager webapp directly, and possibly set autoDeploy=false.
>
>- -chris
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>Comment: GPGTools - http://gpgtools.org
>Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
>iQIcBAEBCAAGBQJR3tGUAAoJEBzwKT+lPKRYwmEQAL+oOvXjL26Rbb9cn7i5udJb
>2fEoJ+WTUhwiT15KFE8sSMkhj9G31Rhd6RH5Rf9zz4Zii1mUqpsiZzJUR7zBfwwH
>Qbl2EEaFoExd1w6d1TxwMb9W6VZTo6v08UoOf85EhYbXZN3niORuavEhSk5mj7B+
>AglGZuglKTwOwisDN5SWOzVmd9Uhvy2Tju9244sgHh8gRvr04y63KaCNu07vCo4I
>GOM/nx2gwSMtZewExJLsmZZo9gSpVD/UeypOmnEWoz+49lYzOlPxPcX/LLS1/3Ci
>Lc19Em7cgW1XTAqV/dTCL9kJ7q5J0Y8UiAJdmV6AqyIqlQQc9xaeJrll9khuukqg
>DLM25fqBfgs7qgyUjE8AQVjBoXeeqclW+txQo2AX2lag/eS3sVJzZKxl/tPySsb7
>ZRs7r2OjKpZTnDUGB4rEW7b3Xlm2gT1l7HEKHer0WFOljgl5pANDR99sfm9ZTlmK
>m5GAoswXyQPt0negcQ8AUsWuC/F+IsRD8onC0pf5Y0tx2KgXDirTA0hSh39gZ34o
>5g/oc0BXfcUKxlamzsHU3P2KLRpeBexDiwAE/lTXQtLuidzRYjIM1G1RskJymvyO
>fN7opxmSgMpe0+7CljfxAdDTOPixJCWme9bgVT6XCbT61/gGH9OgFFHky/2JJqk7
>jcWyoazzI0RplPOK82mm
>=dfNK
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>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: Expected Delay when Switching to New Version of Application Using Parallel Deployment (Tomcat 7.0.27)

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

Jeremy,

On 7/9/13 9:58 AM, Majors, Jeremy wrote:
> On 7/8/13 10:52 PM, "Christopher Schultz"
> <ch...@christopherschultz.net> wrote:
> 
> Jeremy,
> 
> On 7/5/13 11:24 AM, Majors, Jeremy wrote:
>>>> For a simple web application, what is the expected delay
>>>> when switching to new version of an application when using
>>>> the parallel deployment process?  I'm trying to do timings
>>>> right now with a single Hello World JSP and sometimes there
>>>> is a delay of up to 4 seconds when the new version of the
>>>> application is deployed (running 5 users simultaneously using
>>>> Jmeter with cookies turned off), but other times I don't see
>>>> this behavior.
> 
> How are you deploying the new version? Are you dropping another
> WAR file into the webapps/ directory, or are you using the manager
> webapp to deploy the new version?
> 
>> Our current deployment mechanism involves placing a new
>> context.xml file in {tomcat.root}/conf/Catalina/localhost/ which
>> has the docbase property set to an already exploded WAR.

I suspect you are seeing the delay caused by Tomcat only
periodically-polling for deployment descriptor updates: they are not
instantaneous. I think you can adjust the polling time by setting the
backgroundProcessorDelay attribute on your <Host> element. (I looked
at the code to determine if this was true, but I can't seem to prove
it. I don't see any other options that could affect this polling-time,
so I suspect this is the case).

Note that reducing the backgroundProcessorDelay from the default of 10
may lead to performance problems, as a lot of resources are scanned to
see if any of them has changed.

If you want to allow for near-instantaneous redeployment, you should
use the manager webapp directly, and possibly set autoDeploy=false.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJR3tGUAAoJEBzwKT+lPKRYwmEQAL+oOvXjL26Rbb9cn7i5udJb
2fEoJ+WTUhwiT15KFE8sSMkhj9G31Rhd6RH5Rf9zz4Zii1mUqpsiZzJUR7zBfwwH
Qbl2EEaFoExd1w6d1TxwMb9W6VZTo6v08UoOf85EhYbXZN3niORuavEhSk5mj7B+
AglGZuglKTwOwisDN5SWOzVmd9Uhvy2Tju9244sgHh8gRvr04y63KaCNu07vCo4I
GOM/nx2gwSMtZewExJLsmZZo9gSpVD/UeypOmnEWoz+49lYzOlPxPcX/LLS1/3Ci
Lc19Em7cgW1XTAqV/dTCL9kJ7q5J0Y8UiAJdmV6AqyIqlQQc9xaeJrll9khuukqg
DLM25fqBfgs7qgyUjE8AQVjBoXeeqclW+txQo2AX2lag/eS3sVJzZKxl/tPySsb7
ZRs7r2OjKpZTnDUGB4rEW7b3Xlm2gT1l7HEKHer0WFOljgl5pANDR99sfm9ZTlmK
m5GAoswXyQPt0negcQ8AUsWuC/F+IsRD8onC0pf5Y0tx2KgXDirTA0hSh39gZ34o
5g/oc0BXfcUKxlamzsHU3P2KLRpeBexDiwAE/lTXQtLuidzRYjIM1G1RskJymvyO
fN7opxmSgMpe0+7CljfxAdDTOPixJCWme9bgVT6XCbT61/gGH9OgFFHky/2JJqk7
jcWyoazzI0RplPOK82mm
=dfNK
-----END PGP SIGNATURE-----

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


Re: Expected Delay when Switching to New Version of Application Using Parallel Deployment (Tomcat 7.0.27)

Posted by "Majors, Jeremy" <jm...@tribune.com>.
On 7/8/13 10:52 PM, "Christopher Schultz" <ch...@christopherschultz.net>
wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA256
>
>Jeremy,
>
>On 7/5/13 11:24 AM, Majors, Jeremy wrote:
>> For a simple web application, what is the expected delay when
>> switching to new version of an application when using the parallel
>> deployment process?  I'm trying to do timings right now with a
>> single Hello World JSP and sometimes there is a delay of up to 4
>> seconds when the new version of the application is deployed
>> (running 5 users simultaneously using Jmeter with cookies turned
>> off), but other times I don't see this behavior.
>
>How are you deploying the new version? Are you dropping another WAR
>file into the webapps/ directory, or are you using the manager webapp
>to deploy the new version?

Our current deployment mechanism involves placing a new context.xml file
in {tomcat.root}/conf/Catalina/localhost/ which has the docbase property
set to an already exploded WAR.

>
>> Does anyone know if it is expected for there to be a slight hiccup
>> in response times when the applications are deployed via parallel
>> deployment?  I understand that many applications will have
>> initialization logic and that may cause a delay, but I'm wondering
>> if I should expect tomcat to introduce a very small delay when
>> switching from the old version to the new version and if so, how
>> long should I expect that process to take.
>
>You might be seeing the delay that Tomcat has between auto-deployment
>runs... it can't scan the webapps/ directory all the time for updates,
>or it would significantly impact overall performance of the server.
>
>- -chris
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
>Comment: GPGTools - http://gpgtools.org
>Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
>iQIcBAEBCAAGBQJR24j5AAoJEBzwKT+lPKRYLcsP/iPCSidPLU2TzpEOgGNVRn/q
>MqCrczqR9hENmJdDFX7ViAt9wB7xi6VONzcCZrVjre76PDVAMaPs10vzpV8kGpAW
>B9JqSn+200HStHP/Xc03vgl9Ol2WgWfx74sZclpyWGiyFZwFEbj8g/C9ynw8vAlJ
>U4PugBbVMURcE32sT/tuBtlPFceGkT2k7n3Te6dcDTkO2ymFkP0cAuU3Mv4WYr07
>Rwc92p+KRhWk2QJVXKnoaLzDohXxRwarASuZjmcptOeNIqW0TYh6baZ2SP9f0Maj
>CR2Z+fXyEEGeAocPbE4AfrusD902zrEitNdii93Frxt9LGxOMrZuPoEGKv7x3O6y
>NhHwn05msZ6wsJ9h0RWcZjxsvL4z6SSTByT5UrK3QnG86DIhPLhA8NzQWjqRafbu
>JfFKK8a3/2JffbJjnHfy5bd7yoXVzVUFEkq6PuyPtCcNQ3mur95OklCiVxRQQETB
>To4PQrkNLVDfIg5BLo+e+slvCiBkozM1RZgXSiDixgHuNvg+GldRrZsXnIzKuwT7
>y0GR65vm557MQSPjCUtsZ2BiAhsDzgLgwhhdwPwsh3UzoYLdZr1WWBerm7c0mgVO
>pyTw0ec9lld3mxXYbq36tepDqCHK01ldow1Y4x9k2YA0Sp7z4zhcWV/2UcmANmuU
>s2hOcI7QwCjM4sBCOShW
>=DU3C
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>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: Expected Delay when Switching to New Version of Application Using Parallel Deployment (Tomcat 7.0.27)

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

Jeremy,

On 7/5/13 11:24 AM, Majors, Jeremy wrote:
> For a simple web application, what is the expected delay when 
> switching to new version of an application when using the parallel 
> deployment process?  I'm trying to do timings right now with a
> single Hello World JSP and sometimes there is a delay of up to 4
> seconds when the new version of the application is deployed
> (running 5 users simultaneously using Jmeter with cookies turned
> off), but other times I don't see this behavior.

How are you deploying the new version? Are you dropping another WAR
file into the webapps/ directory, or are you using the manager webapp
to deploy the new version?

> Does anyone know if it is expected for there to be a slight hiccup
> in response times when the applications are deployed via parallel
> deployment?  I understand that many applications will have
> initialization logic and that may cause a delay, but I'm wondering
> if I should expect tomcat to introduce a very small delay when
> switching from the old version to the new version and if so, how
> long should I expect that process to take.

You might be seeing the delay that Tomcat has between auto-deployment
runs... it can't scan the webapps/ directory all the time for updates,
or it would significantly impact overall performance of the server.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJR24j5AAoJEBzwKT+lPKRYLcsP/iPCSidPLU2TzpEOgGNVRn/q
MqCrczqR9hENmJdDFX7ViAt9wB7xi6VONzcCZrVjre76PDVAMaPs10vzpV8kGpAW
B9JqSn+200HStHP/Xc03vgl9Ol2WgWfx74sZclpyWGiyFZwFEbj8g/C9ynw8vAlJ
U4PugBbVMURcE32sT/tuBtlPFceGkT2k7n3Te6dcDTkO2ymFkP0cAuU3Mv4WYr07
Rwc92p+KRhWk2QJVXKnoaLzDohXxRwarASuZjmcptOeNIqW0TYh6baZ2SP9f0Maj
CR2Z+fXyEEGeAocPbE4AfrusD902zrEitNdii93Frxt9LGxOMrZuPoEGKv7x3O6y
NhHwn05msZ6wsJ9h0RWcZjxsvL4z6SSTByT5UrK3QnG86DIhPLhA8NzQWjqRafbu
JfFKK8a3/2JffbJjnHfy5bd7yoXVzVUFEkq6PuyPtCcNQ3mur95OklCiVxRQQETB
To4PQrkNLVDfIg5BLo+e+slvCiBkozM1RZgXSiDixgHuNvg+GldRrZsXnIzKuwT7
y0GR65vm557MQSPjCUtsZ2BiAhsDzgLgwhhdwPwsh3UzoYLdZr1WWBerm7c0mgVO
pyTw0ec9lld3mxXYbq36tepDqCHK01ldow1Y4x9k2YA0Sp7z4zhcWV/2UcmANmuU
s2hOcI7QwCjM4sBCOShW
=DU3C
-----END PGP SIGNATURE-----

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