Availability Guide for Application Design

Designing Applications for Change
Availability Guide for Application Design525637-004
10-41
Replacing the Process
a. The primary process requests that the backup process use the
PROCESS_STOP_ procedure to terminate itself.
b. The backup process terminates. The application is no longer running as a
process pair.
c. The primary process starts the V2 code in processor 2, specifying in the
PROCESS_CREATE_, PROCESS_LAUNCH_, or __ns_start_backup()
function that the new process be its backup process.
d. The V2 backup process starts.
e. The two processes verify with a handshake protocol (such as a message
system dialect or startup message) that they are compatible versions.
f. The V1 primary process sends all current context information to the new
backup process as a “big” checkpoint.
g. The V1 primary process calls the CHECKSWITCH procedure to switch the role
of the primary process with that of its V2 backup process. The
CHECKMONITOR procedure in the backup process sees the request and
performs the switch. After the switch, the primary process is in processor 2 and
the backup process is in processor 1.
h. The new primary process (now V2) terminates its V1 backup process. The
application is no longer running as a process pair.
i. The V2 primary process starts a new V2 backup process in processor 1 and
sends all current context information to the new backup process as a big
checkpoint. The application is again running as a NonStop process pair, but the
primary process is in processor 2 and the backup process in processor 1.
j. The V2 backup process switches roles with its V2 primary process, in response
to another CHECKSWITCH procedure call in the primary process. This action
restores the primary and backup processes to their original processors.
The migration is complete.
Performing a Global Process Switch
This technique is similar to the technique described for Tuxedo server classes in Dual-
Server Approach on page 10-25. This technique is usually what is meant by the phrase
“rolling server replacement.”
The global process switch technique relies upon a site-written process to assign new
users of a process pair to the V2 version of the application while existing users are
accessing a V1 process pair.
Again, the following technique assumes that operator actions occur, or it can be
automated. The technique is highly reliable; the likelihood of the application becoming
unavailable during the procedure is the same as the likelihood of simultaneous dual
processor failures.