High Availability:Software:Configuration Database

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(add solution developer warnings and reference)
(improve switchover description)
Line 18: Line 18:
 
It is interesting to note that both Toolpack system access the same database.
 
It is interesting to note that both Toolpack system access the same database.
  
The next image shows a database [[Switchover |switchover]]:
+
The next image shows a database [[Switchover |switchover]], since the primary database is lost, the secondary database becomes master and both [[Toolpack]] interacts with the new master database:
  
 
[[Image:DB_HA_Sec_master_No_Prim.png|widthpx|High available Toolapck system with the master database on the secondary host after a switchover]]
 
[[Image:DB_HA_Sec_master_No_Prim.png|widthpx|High available Toolapck system with the master database on the secondary host after a switchover]]

Revision as of 10:53, 5 January 2010

The Toolpack configuration is located in a MySQL database.


Contents

High Availability

Database Connection

Since Toolpack is not necessarily running on the same host as the MySQL database, it uses sockets to connect to the database. To increase the reliability, Toolpack uses 2 database connections. If one becomes unavailable(example network is down), Toolpack can still connect to the database using the other sub net.

Database Replication

To protect against a loss of database, Toolpack uses the MySQL database replication feature. In a typical 2 hosts redundancy setup, the primary and secondary hosts will run a Toolpack system and a MySQL database. At start up, Toolpack will configure one database as master database, the other as slave. Once the database configuration is done the master database will copy itself in the slave database. After that, any changes made on the master database will then get replicated on the slave database.

The following figure illustrates the database setup in a high availability system:

High available Toolapck system with the master database on the primary host

It is interesting to note that both Toolpack system access the same database.

The next image shows a database switchover, since the primary database is lost, the secondary database becomes master and both Toolpack interacts with the new master database:

High available Toolapck system with the master database on the secondary host after a switchover


When the primary database becomes available again, Toolpack sets it as replication slave. There is no database switch back as illustrate with the following image:

High available Toolapck system with the master database on the secondary host

Solution Developers

For solution developers that use MySQL in there solution, there are extra MySQL configuration to consider. If your solution also uses MySQL replication, it will be mandatory to use different instances of MySQL server, one set of server for both system (Toolpack and your solution). If your solution uses MySQL but not the replication feature, it will be important to configure the MySQL server to replicate only the Toolpack database (toolpack_0 by default).

References

Personal tools