A HiRDB/Parallel Server uses multiple back-end servers to process multiple SQL processing in parallel. The front-end server is responsible for such operations as executing SQL analysis and SQL optimization, sending instructions to the back-end servers, and editing retrieval results. In a system with heavy traffic, the front-end server's workload may be very high, resulting in adverse effects on processing performance. In such a case, multiple front-end servers can be installed in order to distribute the workload. This is called multiple front-end servers.
Figure 9-2 System configuration for a HiRDB/Parallel Server with multiple front-end servers
When there are multiple front-end servers, the front-end server that is to be connected to a UAP is determined as follows.
Because there are multiple front-end servers executing, no special specifications are usually required.
However, appropriate values must be specified in the following operands (for details about the standard values for these operands, see the manual HiRDB Version 9 System Definition):
The operating procedures are the same, but there are differences in the operands that are specified in the HiRDB system definition and in the environment setup procedures, such as the number of system files to be created.
If a table contains a timestamp-type column for which the DEFAULT clause with CURRENT_TIMESTAMP as the default value was specified during table definition, you must take precautions when you sort the table by row insertion or update time in a configuration of multiple front-end servers.
In the case of multiple front-end servers, the front-end server connected to the UAP acquires the current timestamp and sets that value as the default value for the timestamp column. Note that the system time may not match between the units containing the front-end servers. If the system time does not match, the sort order based on the timestamp column and the sort order based on the actual row insertion or update time will not match.
To match the sort order, specify the DEFAULT clause with CURRENT_TIMESTAMP USING BES as the default value for the timestamp column during table definition. If you specify USING BES, the back-end server that manages the RDAREA storing the row to be inserted or updated is used to acquire the current timestamp, and then that value is inserted in the row or the row is updated by that value. As a result, the sort order based on the timestamp-type column matches the sort order based on the actual row insertion or update time for each unit that contains the back-end server managing the RDAREA that stores the row.
The following table shows the server that acquires the current timestamp depending on whether USING BES is specified.
Table 9-2 Server that acquires the current timestamp depending on whether USING BES is specified
USING BES | Server that acquires the current timestamp | |
---|---|---|
HiRDB/Single | HiRDB/Parallel Server | |
Not specified | Single server | Front-end server that connected to the UAP |
Specified | Back-end server that manages the RDAREA containing the row to be inserted or updated |
To enable a client user to select the front-end server for connection, the desired front-end server must be specified in the client environment definition. The client environment definition varies depending on whether the high-speed connection facility or the FES host direct connection facility is used. The following table shows the client environment definitions that must be specified. For details about the client environment definitions, see the HiRDB Version 9 UAP Development Guide.
Table 9-3 Client environment definitions required for multiple front-end servers
Client environment definition operand | Not specifying a front-end server to be connected | Specifying a front-end server to be connected | |
---|---|---|---|
FES host direct connection | High-speed connection | ||
PDHOST | M | M | M |
PDFESHOST | -- | M | M |
PDNAMEPORT | M | M | M |
PDSERVICEPORT | -- | -- | M |
PDSERVICEGRP | -- | M | M |
PDSRVTYPE | -- | -- | M |
The HiRDB server connection time increases from 1 to 3 as follows (with 1 being the shortest):