Best practices for deploying Java webapps with minimal downtime?

前端 未结 18 1849
我在风中等你
我在风中等你 2021-01-29 18:28

When deploying a large Java webapp (>100 MB .war) I\'m currently use the following deployment process:

  • The application .war file is expanded locally on the develop
18条回答
  •  粉色の甜心
    2021-01-29 19:05

    My advice is to use rsync with exploded versions but deploy a war file.

    1. Create temporary folder in the live environment where you'll have exploded version of webapp.
    2. Rsync exploded versions.
    3. After successfull rsync create a war file in temporary folder in the live environment machine.
    4. Replace old war in the server deploy directory with new one from temporary folder.

    Replacing old war with new one is recommended in JBoss container (which is based on Tomcat) beacause it'a atomic and fast operation and it's sure that when deployer will start entire application will be in deployed state.

提交回复
热议问题