High-availability solving method and device of database cluster
A solution method and database technology, applied in the field of high-availability solutions and devices of database clusters, can solve the problems of unusable, non-existent, and main database master downtime of MySQL database clusters.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0066] Embodiments of the present invention provide a high-availability solution for database clusters, which can be implemented in database clusters. When the master database in the database cluster cannot provide services, an alternative slave database can be immediately selected as the new master database. Ensure the normal operation of the database cluster.
[0067] figure 2 It is a schematic flowchart of a high-availability solution method for a database cluster provided in this embodiment, and the method includes steps S202 to S206.
[0068] S202: Obtain a list of all slave databases of the database cluster when the master database of the database cluster cannot provide services.
[0069] S204: According to the preset condition, among all the slave databases recorded in the list, one slave database is selected as a new master database.
[0070] S206: Switch the master database of the database cluster to the above-mentioned new master database.
[0071] The present in...
Embodiment 2
[0073] This embodiment is a specific application scenario of the first embodiment above. Through this embodiment, the method provided by the present invention can be described more clearly and specifically.
[0074] It should be understood that the present invention does not limit the type of database, as long as the following solutions of the present invention can be applied to achieve high availability, all databases are applicable here. In addition, the connection control device is not limited to be implemented by a server, and those skilled in the art can also implement the connection control device in other ways on the basis of reading the present invention, all of which should fall within the scope of the present invention .
[0075] Below, will take Mysql data as an example to illustrate the technical solution of the present invention:
[0076] In order to describe the method provided by the embodiment of the present invention more clearly, in the second embodiment, th...
Embodiment 3
[0122] Figure 6 It is a structural block diagram of a high-availability solution device for a database cluster provided by an embodiment of the present invention. The database cluster adopts a master-slave structure. The device 600 includes:
[0123] The list acquisition module 610 is adapted to acquire a list of all slave databases of the database when the master database of the database cluster cannot provide services;
[0124] The master database screening module 620 is adapted to select a slave database as a new master database among all the slave databases recorded in the above list according to preset conditions;
[0125] The switching module 630 is adapted to switch the primary database of the database cluster to the above-mentioned new primary database.
[0126] Optionally, all IP addresses corresponding to the slave databases are recorded in the above list.
[0127] Optionally, the master database screening module 620 is further adapted to select a vital slave data...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com