Configuring an HA environment for API calls from z/OS
applications
You can configure a highly available IBM® z/OS® Connect environment that handles API calls from z/OS applications through API requesters.
Note: For more information about the concepts of high availability and the options you can choose,
see High Availability.
The following diagram demonstrates the following topological characteristics:
Two IBM z/OS Connect servers run in each LPAR.
Sysplex Distributor provides high availability and workload balancing.
Port sharing is configured for each LPAR.
Sysplex Distributor is configured with the OPTLOCAL feature to take advantage of co-location
optimization. For more information about configuring sysplex distributor to prefer local
connections, see Sysplex distributor.
Figure 1. Topological characteristics of an HA configuration
The following configuration steps demonstrate how to configure two servers in one LPAR for
HA.
On the first server, go through the steps as outlined in the high-level workflow in What is the IBM z/OS Connect API requester? to configure, develop, deploy, and test all the required
artifacts to call an API from your z/OS application. Ensure
everything works properly on the first server.
General steps to configure for HA
The following steps demonstrate setting
up HA with two IBM z/OS Connect servers in one LPAR,
sharing a TCP/IP port.
Set up HA for the first server:
Set up TCP/IP port sharing.
Note: Choose an unreserved port number. Use a different port number
from the number that is used as the HTTP listener for incoming HTTP requests for services and APIs
to access the backend z/OS assets.
Create a shared configuration file. This step involves moving the
server.xml to a location that can be shared with the second server and creating
another copy of the server.xml for the first server that points to the shared location.
Stop the server.
Create directories under /var/zosconnect to store the shared configuration
file. For example, run the following command from the /var/zosconnect
directory:
mkdir -p shared/config
Move the server.xml to a shared configuration directory with a new name.
For example, rename it as haserver.xml.
Create a server.xml for the server with the following content:
This
configuration file includes the shared haserver.xml by using the Liberty
property ${shared.config.dir} to reference the directory that contains the
shared configuration files. This property points to the directory
WLP_USER_DIR/shared/config. The include statement points to
the renamed file, haserver.xml, in the shared location.
Restart the server.
Add a second server.
Replace the default server.xml file on the second server with the
server.xml file from the first server, so both the first server and the second
server point to the shared location for the server configuration file.
Start your second server.
The two server instances now share the same resources, and the HA environment for API
requesters is configured.