Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
sg247887.pdf
Скачиваний:
18
Добавлен:
01.03.2016
Размер:
4 Мб
Скачать
☆

5.3 HA management in solidDB HSB

The primary role of any HA architecture is to maintain system availability in the presence of failures. In a hot-standby system such as solidDB HSB, a failure of the Primary process or Primary node is followed by a failover to the Secondary server. In executing a failover, a governing principle is that no single solidDB server can make that decision on its own because a single server does not have sufficient information for doing that. If the failover was the responsibility of a server, then, in the case of network partitioning (HSB link failure), the two servers might decide that each becomes a Primary Alone (a split-brain scenario). Dual Primaries are not allowed because there are no consistency-preserving methods to merge two databases having different histories into one Primary database. For this reason, the responsibility to decide about a failover, and execute it, is

deployed within a component (or components) outside of the HSB servers. The functionality in question is called HA control. In this section, we introduce three

ways to implement HA control in solidDB HSB.

5.3.1 HA control with a third-party HA framework

If solidDB becomes a part of a broader HA system, capacity to execute HA control might already be in that system. The necessary functionality can be a

part of a cluster management software or other generalized HA management software that can be abstracted as an HA framework. In that case, solidDB is

integrated with the rest of the HA system, such as depicted in Figure 5-10.

 

 

TM1 load

 

 

Applications

 

 

generator

Primary

HSB

Secondary

 

 

solidDB HSB

 

 

Replication

 

 

solidDB admin commands

solidDB adapter

 

solidDB adapter

 

DistributedHAframework

Node A

 

Node B

Figure 5-10 Using and external HA framework

124 IBM solidDB: Delivering Data with Extreme Speed

An HA framework is typically a distributed software having an instance running on each node of the system. First, it is responsible for failure detection. Detecting hardware and operating system failures is unrelated to solidDB. Detecting solidDB process failures is implement by a heart beat method, possibly based on polling. If there is a failover, the HA framework commands all relevant components with state change primitives. If there is an operator interface, the operator commands are passed to system components also. The reporting of the

component state travels the other way around. The tasks of integrating solidDB into such a system involves developing a solidDB adaptation (of scripts or

interface calls) that translates the primitives of the HA framework to solidDB commands.

5.3.2 HA control with the watchdog sample

The solidDB product package has a sample program called Watchdog (in the HSB sample set) that implements a rudimentary HA control. Watchdog is used in a configuration such as the one shown in Figure 5-11.

 

TM1 load

 

Applications

 

generator

Primary

HSB

Secondary

 

soliDBd HSB

 

Replication

Node A

Node B

 

solidDB admin commands

 

solidDB

 

watchdog

 

sample

Figure 5-11 Using the Watchdog sample program

Watchdog includes both the failure detection and failover logic. The former is based on time-outs of active heart beat requests. If the Primary does not respond, it is considered to have failed. This method is prone to false failures or of having too long a failure detection time, depending on the timeout settings. Another deficiency is that the Watchdog instance is not backed up in any way. Thus, the sample is not meant for production use as such. However, it can be used as an area for experimenting with solidDB HA commands.

Chapter 5. IBM solidDB high availability 125

5.3.3 Using solidDB HA Controller (HAC)

A production-ready solution to solidDB-only HA control is called HA Controller (HAC). HAC binaries are distributed with the product. HAC is used in the form of two instances running on both the Primary and Secondary nodes, as shown in Figure 5-12.

IBM Software Group

| Information Management Software | solidDB

 

 

TM1 load

 

 

Applications

 

 

generator

 

 

HSB

Primary

 

Secondary

 

 

Solid HSB

 

 

Replication

solidDB HA Controller

solidDB HA Controller

Node A

 

Node B

HA Admin

 

JDBC

Node

GUI-based HA Manager

 

 

 

HA Manager GUI

Figure 5-12 Using solidDB HA Controller

Failure detection in HAC is based on solidDB events. A surviving server will notify HAC of the failure of the mate node or server. The event-based method is fast and allows for sub-second failovers. The failover logic guarantees an unambiguous failover decision in all failure cases other than HSB link failures. For a remedy to deal with those, see the information about External Reference Entity, in 5.3.4, “Preventing Dual Primaries and Split-Brain scenarios” on

page 128.

HAC can also be configured to start and restart solidDB servers automatically.

126 IBM solidDB: Delivering Data with Extreme Speed

In connection with HAC, a basic GUI-based administrator tool is available, called HA Manager (HAM), as shown in Figure 5-13.

File HAC1 HAC2

 

 

IBM solidDB HotStandby

Node: Server 1

 

Node: Server 2

 

 

 

 

 

 

 

solidDB

solidDB

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Primary Active

 

 

 

 

 

Secondary Active

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

HA Controller

 

 

HA Controller

 

 

 

 

 

Connected

 

 

Mode: Automatic

 

 

 

 

Mode: Automatic

 

 

 

 

 

 

 

 

 

 

Figure 5-13 HA Manager GUI

HAM is a Java-based, cross-platform tool where any number of instances can be active in a system. The GUI of HAM displays the HA state of the servers, the direction of replication, the state of the HSB link, and the state of HAC.

The Automatic mode of HAC means that both failure detection and failover execution is enabled. The mode can be changed to Administrative whereby the

failover execution is disabled. Additionally, the execution of HAC can suspended and resumed. The GUI controls included allow the administrator to perform server switchovers and change the HAC states.

The HAC binary is available in the HAC sample directory, in the product package.

Chapter 5. IBM solidDB high availability 127

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]