This topic describes a quick start procedure for HotStandby (HSB) with solidDB High Availability Controller (HAC).
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 enforced by the High Availability Controller (HAC).
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.
Complete the following steps to configure a fault tolerant HSB system ready to serve applications.
As a result, one of the servers is in PRIMARY ACTIVE state and the other in SECONDARY ACTIVE state.
2 Configure the HACs on the primary and secondary servers. A HAC reads the 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 (This parameter is mandatory if EnableDBProcessControl=Yes, which is the default value)
[RemoteDB] section
▪ Connect=<connect address, protocol, ip/hostname, port #>
HAC automatically determines which server becomes the new primary server 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 server. In these situations HAC chooses the server where the PreferredPrimary parameter in the [LocalDB] section in solidhac.ini is set to Yes.
One server should now be in PRIMARY ACTIVE state and the other in SECONDARY ACTIVE state. You can switch the roles, by running 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.
Results
You can now start using applications that interact with the HSB servers.