Jetty high availability keeps a single application endpoint reachable during node failure by moving both the service and its virtual IP address together.
The pcs CLI configures Pacemaker resources backed by Corosync messaging. A floating IPv4 address is provided by the OCF IPaddr2 resource agent, while a systemd resource starts and stops Jetty using its unit file. Grouping the resources enforces colocation and ensures the VIP is assigned before the application is started.
Cluster nodes must share the same Layer-2 network for the VIP so ARP announcements propagate during failover. Jetty binaries and configuration must match on each node, and application state should be stored outside the process (database, cache, shared storage) to avoid session loss on failover. Existing TCP connections drop during a move, so upstream timeouts and retries should tolerate brief resets.
Related: How to set up Jetty active-active with PCS
Related: How to create a Pacemaker cluster
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-01 (version 2.1.6-6fdc9deea29) - partition with quorum * 3 nodes configured * 0 resource instances configured ##### snipped #####
$ systemctl list-unit-files --type=service | grep -E '^jetty.*\.service' jetty9.service enabled enabled
$ sudo systemctl disable --now jetty9 Synchronizing state of jetty9.service with SysV service script with /usr/lib/systemd/systemd-sysv-install. Executing: /usr/lib/systemd/systemd-sysv-install disable jetty9 Removed "/etc/systemd/system/multi-user.target.wants/jetty9.service". ##### snipped #####
Active connections to Jetty drop when the service stops.
$ sudo pcs resource create jetty_ip ocf:heartbeat:IPaddr2 ip=192.0.2.62 cidr_netmask=24 op monitor interval=30s
Using an IP address already assigned on the network causes address conflicts and intermittent outages.
Add nic=<interface> to the IPaddr2 resource when multiple interfaces share the same subnet.
$ sudo pcs resource create jetty_service systemd:jetty9 op monitor interval=30s
Use the unit name returned by systemctl, such as systemd:jetty9.
$ sudo pcs resource group add jetty-stack jetty_ip jetty_service
$ sudo pcs status resources
* Resource Group: jetty-stack:
* jetty_ip (ocf:heartbeat:IPaddr2): Started node-01
* jetty_service (systemd:jetty9): Started node-01
Both resources should show Started on the same node.
$ curl -I http://192.0.2.62:8080/ HTTP/1.1 200 OK Last-Modified: Thu, 01 Jan 2026 06:29:10 GMT Content-Type: text/html Accept-Ranges: bytes Content-Length: 1004 Server: Jetty(9.4.53.v20231009)
An HTTP response confirms the VIP and Jetty are reachable; the status code depends on the deployed application path.
Failover moves terminate existing client connections and may trigger upstream retries.