To start using a Natural application in an HA environment, the following aspects must be considered:
Adabas must be accessed by configuring the TCP/IP as described in the Adabas ADATCP Access section.
Transactions for other databases (e.g., SQL) cannot cross I/O boundaries. This is because it is not possible to save and restore the state for such databases before and after an I/O occurs.
If the application performs printing or sorting, or uses work files that are read or
written across I/O boundaries, the
HA_FILESHARE path (see under Local Configuration
File > Installation Assignments) should be defined to
a highly available directory that is accessible from all backend servers. Both, printing
and sorting use the HA_FILESHARE directory (if defined) implicitly when
Natural is running in HA mode. The same applies to work files without any path
information. However, for work files used across I/O boundaries, it is necessary to
adapt any explicit paths to point to the shared location. Note that the internal
environment variable $HA_FILESHARE can be used to represent
the HA_FILESHARE directory when defining work file locations (e.g.,
$HA_FILESHARE/wrk001.txt). Work files that are not used across I/O boundaries can continue to use non-shared
locations.
Natural/HA requires a state server. By default, if a HA_FILESHARE path has
been defined (see above), Natural/HA sessions will be saved there. Otherwise, it is
possible to define one or more explicit state servers (e.g., REDIS© enterprise
databases) and select which one of them should be used via the STATESRV profile
parameter.
If setting up a read-only buffer pool, the object NATURAL.CXSD in the RES subdirectory of the [FNAT] SYSTEM library should be included in the preload list. This file contains the schema (i.e., data structure) common to all saved Natural/HA sessions and is needed to be able to both read and write them.
Note
Because work on this topic is continuing, with improvements being frequently back-ported
to this version, it is strongly recommended to keep up with any product updates (e.g., fix
levels) when making use of this functionality.
When launching Natural with the nwo.sh script in a Natural/HA environment, it is essential that the Natural startup parameters provided by the NHA server are preserved and passed unchanged to the Natural session.
If $NaturalParameters is not passed to the Natural runtime:
Session save and restore functionality will not work correctly.
The application may no longer operate as a fully supported Natural/HA session.
Correct example:
/users/sag/nat/version/bin/natural $NaturalParameters etid=$ > /dev/null 2>&1
Incorrect example:
/users/sag/nat/version/bin/natural etid=$ > /dev/null 2>&1