Availability Guide for Application Design
Designing Applications for Change
Availability Guide for Application Design—525637-004
10-39
Replacing the Process
•
Libraries used by the process
The same techniques allow a process pair to be downgraded when fallback to an
earlier version of an application is required.
All techniques require the application to be coded such that special attention is paid to
changes in any of the following between versions of the code:
•
Constants
•
Function pointers
•
Data item sizes
•
Data structure alignments
When such changes occur, the newer version must contain conditional code that tests
for the older version of checkpointed data and correctly handles that older data until
the transition of the process pair is complete. Function or data pointers passed in
checkpoint data can become invalid during the transition and should be removed when
preparing a process pair for replacement.
Similarly, changes in algorithms between versions of the code must be conditional; the
newer code must behave like the older code until the transition is complete. This
convention also makes regressions less obvious if the process pair fails during the
transition.
When you must add information to a data structure or a message, or a new parameter
to a function, try to add the new entity to the end of the construct. This convention
makes emulation of older code much easier.
Replacing the Process
Consider the situation where an application program needs to be migrated from using
one version of its code (V1) to another version (V2) while the application is running as
a process pair. Techniques for replacing a running process within a process pair
include:
•
Replacing the backup process
•
Performing a global process switch
Replacing the Backup Process
The recommended technique for replacing a running process pair focuses on replacing
the backup process. This technique is usually what is meant by the phrase “process-
pair replacement.”
This technique can be implemented through the operator actions described below, or it
can be automated. The technique is fairly reliable, with a likelihood of the application
becoming unavailable during the procedure of once in every 500 replacements
(calculated using system hardware mean-time-between-failures data and historical
process-pair failure rates).