High Availability:Software:Configuration Database
m (improve description) |
(fix typo) |
||
(3 intermediate revisions by one user not shown) | |||
Line 6: | Line 6: | ||
=== Database Connection === | === 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. | + | 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. It is recommended to use the [[Toolpack]] control network sub net for the database connection. |
=== Database Replication === | === Database Replication === | ||
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 | + | 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]] | ||
− | When the [[Primary/Secondary|primary]] database becomes available again, [[Toolpack]] sets it as replication [[Master/Slave|slave]]. There is no database switch back as | + | 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] |
Latest revision as of 11:59, 14 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. It is recommended to use the Toolpack control network sub net for the database connection.
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:
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:
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:
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).