This section describes a quick start procedure for HotStandby with solidDB® High Availability Controller (HAC).
About this task
The procedure is similar to HotStandby quick start procedure. However, instead of just setting up two HSB servers, this procedure guides you to set up a highly available HSB system, where availability is enforce by the High Availability Controller (HAC). Following the procedure below, you will get a failure tolerant HSB system ready to serve applications.
To set up and run a high availability HSB system, you need two networked computers. One instance of the HAC is set up on each HSB server.
As a result, one of the servers is in the PRIMARY ACTIVE state and the other in the SECONDARY ACTIVE state.
2 Configure the HACs on the Primary and Secondary servers. HAC reads its configuration from the solidhac.ini file in the working directory. The following mandatory configuration parameters are needed:
[HAController] section
▪Listen=<listen address, 'tcp' and chosen port #>
▪Username
▪Password
▪DBUsername
▪DBPassword
[LocalDB] section
▪Connect=<connect address, protocol, ip/hostname, port #>
▪StartScript(mandatory if EnableDBProcessControl=Yes, which is the default value)
[RemoteDB] section
▪Connect=<connect address, protocol, ip/hostname, port #>
HAC automatically finds out, which server becomes the new Primary according to the previous roles, and log positions. The mechanism is described in more detail in Choosing which server to make primary. In some special situations, for example when started with empty databases, both servers are equally good candidates for the new Primary. In these situations HAC chooses its local server if in the PreferredPrimary parameter in the [LocalDB] section in solidhac.ini is set to Yes.
4 After the second step, there should be one server in the PRIMARY ACTIVE state and the other in the SECONDARY ACTIVE state. You can switch the roles, by issuing the following command on the Secondary server:
ADMIN COMMAND 'hsb switch primary'
or on the Primary server:
ADMIN COMMAND 'hsb switch secondary'
After this point, HAC switches the roles of the servers when necessary. At least one server executes read and write transactions.