Updating Web Applications Running In Production with LiveRebel 2.0
Updating an application to a newer version when it already runs in production is not a trivial task. The update should have minimal impact to connected users and if things do not work as expected, reverting to the previous version should be easy. Applications that run into multiple servers (i.e. cluster) further complicate the update process. This feature is usually offered in the form of a proprietary solution by the vendor of the application server. In its latest version even plain Apache Tomcat offers minimal support for zero downtime updates.
ZeroTurnaround offers LiveRebel 2.0, the next major version of their solution for online updates of Java EE applications. While JRebel is to be used during the development phase of a project, LiveRebel is aimed at production deployments. One important feature of LiveRebel is that is can be used with several application servers. This is accomplished via a special Java agent (in a similar manner to JRebel). Presently the following environments are supported:
- Tomcat 5, 6, 7
- Jetty 5, 6, 7, 8
- JBoss 4,5,6
- Oracle Weblogic 9, 10
- Oracle application server 9,10
- GlassFish open source 3.x
- WebShere 6, 7
- Standalone Java applications
After installing the respective agent to one or more servers, the administrator has a consolidated view of all managed servers and can update running applications on the fly. There are several update strategies such as hotpaching (similar to JRebel) or rolling restarts of servers. LiveRebel ensures that all updates are transactional (either they succeed or fail completely) and all updates are reversible.
To take advantage of LiveRebel, Java applications also need a special liverebel.xml file which is a minimal file holding the version of the packaged application. If the application is built via Maven it is very easy to integrate its generation in the build process.
We spoke with ZeroTurnaround's Marketing Manager Oliver White for some additional clarifications:
InfoQ: It is possible to have the same application on different application servers (e.g. one GlassFish and one Tomcat) and have LiveRebel update them? Or all the servers should be identical?
No, they don't have to be identical.
InfoQ: LiveRebel 2.0 also offers an option for "standalone" updates. How exactly does this work? This is for applications that do not run in an application server? Where is the agent installed then?
Yes, this is for applications that are run through the regular "main" method. The agent is still installed on the JVM and the installation process is similar to the application server case (you have to run your application with the LiveRebel wrapper). However, this mode has some serious limitations - as LiveRebel is not aware of the socket that is serving HTTP, it is unable to proxy HTTP requests - this means no rolling restarts and no socket pausing during updates. The only useful update method in this mode is Hotpatching.
InfoQ: Is LiveRebel dependent on JRebel? That means that a new version of JRebel will always result in a new version of LiveRebel as well?
LiveRebel uses JRebel technology for Hotpatch updates (as one of the update strategies), Internally however, we keep them separate and occasionally push/pull changes between them. This synchronization does not necessarily depend on JRebel release schedule.
InfoQ: Can you give an indication of pricing for our readers?
Unfortunately we cannot disclose the pricing at the moment, soon it will be available on our site, but meanwhile we can just say that it's set to be affordable to anyone with a production deployment.
Shane Hastie Aug 30, 2014
Roy Rapoport Aug 28, 2014