High Availability:Software:Configuration Database

From TBwiki
(Difference between revisions)
Jump to: navigation, search
m (improve description)
 
(add solution developer warnings and reference)
Line 16: Line 16:
 
[[Image:DB_HA_Prim_master.png|widthpx|High available Toolapck system with the master database on the primary host]]
 
[[Image:DB_HA_Prim_master.png|widthpx|High available Toolapck system with the master database on the primary host]]
  
It is interesting to note that both Toolpack system always 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]]:
Line 23: Line 23:
  
  
When the [[Primary/Secondary|primary]] database becomes available again, [[Toolpack]] sets it as replication [[Master/Slave|slave]]. There is no database switch back as illustrated with the following image:
+
When the [[Primary/Secondary|primary]] database becomes available again, [[Toolpack]] sets it as replication [[Master/Slave|slave]]. There is no database switch back as illustrate with the following image:
  
 
[[Image:DB_HA_Sec_master.png|widthpx|High available Toolapck system with the master database on the secondary host]]
 
[[Image:DB_HA_Sec_master.png|widthpx|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 ==
 +
*[http://dev.mysql.com/doc/refman/5.0/en/replication.html MySQL Replication]

Revision as of 10:46, 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:

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