CN104331508A - Management system and method for realizing load balance of relational database - Google Patents
Management system and method for realizing load balance of relational database Download PDFInfo
- Publication number
- CN104331508A CN104331508A CN201410675352.7A CN201410675352A CN104331508A CN 104331508 A CN104331508 A CN 104331508A CN 201410675352 A CN201410675352 A CN 201410675352A CN 104331508 A CN104331508 A CN 104331508A
- Authority
- CN
- China
- Prior art keywords
- server
- task
- mysql
- data
- main frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Hardware Redundancy (AREA)
Abstract
The invention discloses a management system and method for realizing load balance of a relational database. The method comprises the following steps: a task assigning server receives a service request of a user, and assigns a service task requested by the user to one or more MySQL servers in a coordinated way; the MySQL server constructs an annular chain type architecture with other MySQL servers, each MySQL server takes a previous MySQL server as a host, the state of the host is monitored and detected through heartbeats, original data of a local database is backed up, and meanwhile the service task assigned by the task assigning server is executed simultaneously. By adopting the management system and method, the data security of the data of an enterprise can be ensured, a high-load, high-performance and high-availability data center is established, and the risk of running maintenance is lowered, so that the enterprise cost is lowered, and the profit is increased.
Description
Technical field
The present invention relates to database management technology, particularly relate to management system and the method for the equilibrium of implementation relation type database loads.
Background technology
MySQL is a kind of Relational DBMS, and it is one of application software of best relational database management system (RDBMS, Relational Database Management System) in WEB application.The linked database of MySQL saves the data in different tables, instead of all data is placed in a large warehouse, which substantially increases operating speed and improves the dirigibility that data look for.The sql like language that MySQL uses is the most frequently used standardized language for accessing database.MySQL software have employed two authorization policy, is divided into Community Edition and commercial version.Because its volume is little, speed is fast, the total cost of ownership is low, especially this feature of open source code, the exploitation of general middle-size and small-size website all selects MySQL as site databases.
For a large-scale internet, applications, the page browsing of every day tens causes quite high load to database undoubtedly, and it causes great problem for the stability of system and extendability.And by load balancing, the access load of single machine can be effectively reduced, reduce the possibility of the machine of delaying.
The high availability scheme of MySQL has multiple, as the high availability scheme of the read-write separating of lvs (Linux Virtual Server)+keepalived+drbd+heartbeat, is the most frequently used scheme; For another example the active and standby high availability scheme of drbd+heartbeat is also the high availability scheme etc. relatively commonly used.But these schemes, load balancing is carried out in the read operation of multipair database, and only considers High Availabitity to write operation, is but still wanting in consideration to its load balancing, and thus mostly fail to reach can the target of load balancing and High Availabitity to read-write for these schemes.
Therefore, need the management system that the equilibrium of a kind of implementation relation type database loads is provided, the load balancing to database write operations can be realized, thus reach the target of system High Availabitity.
Summary of the invention
Technical matters to be solved by this invention is to provide management system and the method for the equilibrium of a kind of implementation relation type database loads, can realize the load balancing to database write operations, thus reach the target of system High Availabitity.
In order to solve the problems of the technologies described above, the invention provides the management system of a kind of implementation relation type database loads equilibrium, comprise multiple MySQL servers of task assignment server and task assignment server admin, wherein:
Task assignment server, for receiving the services request of user, and divides in phase task one or more MySQL server by the service role that user asks;
MySQL server, for forming ring-type chain type framework with other MySQL server, every platform MySQL server with MySQL server above for main frame, the state of main frame is detected with heartbeat inspecting, and back up the raw data of native database, the service role that dispatch server of simultaneously executing the task is assigned.
Further,
Data reading operation in services request and/or write operation are coordinated to MySQL server by task assignment server;
MySQL server to service providing data read operation and/or write operation according to the coordination of task assignment server, and starts and carries out the data syn-chronization of related service with main frame after write operation.
Further, task assignment server has two, and wherein first task dispatch server receives the services request of user, and is divided in phase by the service role that user asks and task one or more MySQL server; Second task assignment server heartbeat inspecting detects the state of first task dispatch server.
Further,
If the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server;
If MySQL server detects that main frame has malfunction, then replace the service mission operations of failed host and the execution of heartbeat inspecting operation, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting operation to this failed host.
Further,
If the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed;
If MySQL server detects that failed host recovers normal condition, then the service mission operations of the main frame of this recovery normal condition and heartbeat inspecting operation are backcrossed.
In order to solve the problems of the technologies described above, the invention provides the management method of a kind of implementation relation type database loads equilibrium, comprising:
Multiple stage MySQL server is formed ring-type chain type framework, every platform MySQL server for main frame with MySQL server above, detects the state of main frame, and backs up the raw data of native database with heartbeat inspecting;
Receive the services request of user by first task dispatch server, and the service role of request is divided in phase task one or more MySQL server and perform.
Further, the method also comprises:
Detected the state of first task dispatch server with heartbeat inspecting by the second task assignment server.
Further, the method also comprises:
Data reading operation in services request and/or write operation are coordinated to MySQL server by first task dispatch server;
MySQL server according to the coordination of task assignment server provide service data reading operation and or write operation, and start after write operation and carry out the data syn-chronization of related service with main frame.
Further, the method also comprises:
If the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server; If and/or MySQL server detects that main frame has malfunction, the service mission operations and the heartbeat inspecting operation that then replace failed host perform, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting to this failed host.
Further, the method also comprises:
If the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed; If and/or MySQL server detects that failed host recovers normal condition, then the service mission operations of normal for this recovery main frame and heartbeat inspecting operation are backcrossed.
At cloud computing high speed development instantly, the MySQL server that use is increased income free is the first-selection of numerous enterprises.Therefore, the framework of the chain type ring-type load balancing of MySQL server of the present invention, while can bringing more guaranteed data security for the data of enterprise, build the data center of high capacity, high-performance, High Availabitity, reduce the risk of operation maintenance, thus reduce enterprise cost and improve profit.
Accompanying drawing explanation
Fig. 1 is the structure of the management system embodiment of implementation relation type database loads of the present invention equilibrium;
Fig. 2 is the process flow diagram of the management method embodiment of implementation relation type database loads of the present invention equilibrium.
Embodiment
Below in conjunction with accompanying drawing and preferred embodiment, technical scheme of the present invention is set forth in detail.Should be appreciated that, the embodiment below enumerated only for instruction and explanation of the present invention, and does not form the restriction to technical solution of the present invention.
As shown in Figure 1, illustrate the management system embodiment of implementation relation type database loads equilibrium, comprise multiple MySQL servers of task assignment server and task assignment server admin, wherein:
Task assignment server, for receiving the services request of user, and divides in phase task one or more MySQL server by the service role that user asks;
MySQL server, for forming ring-type chain type framework with other MySQL server, every platform MySQL server with MySQL server above for main frame, the state of main frame is detected with heartbeat inspecting, and back up the raw data of native database, the service role that dispatch server of simultaneously executing the task is assigned.
In said system embodiment,
Data reading operation in services request and/or write operation, according to the services request of user, are coordinated to MySQL server by task assignment server;
MySQL server to service providing data read operation and/or write operation according to the coordination of task assignment server, and starts and carries out the data syn-chronization of related service with main frame after write operation.
In said system,
Task assignment server has two, and first task dispatch server receives the services request of user, and is divided in phase by the service role that user asks and task one or more MySQL server; Second task assignment server heartbeat inspecting detects the state of first task dispatch server.
In said system,
If the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server;
If MySQL server detects that main frame has malfunction, then replace the service mission operations of failed host and the execution of heartbeat inspecting operation, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting operation to this failed host.
In said system,
If the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed;
If MySQL server detects that failed host recovers normal condition, then the service mission operations of the main frame of this recovery normal condition and heartbeat inspecting operation are backcrossed.
The present invention is directed to said system embodiment, correspondingly additionally provide the management method embodiment of implementation relation type database loads equilibrium, its flow process as shown in Figure 2, comprising:
110: multiple stage MySQL server is formed ring-type chain type framework, every platform MySQL server for main frame with MySQL server above, detects the state of main frame, and backs up the raw data of native database with heartbeat inspecting;
120: receive the services request of user by first task dispatch server, and the service role of request is divided in phase task one or more MySQL server and perform.
In said method embodiment, step 120 also comprises:
Detected the state of first task dispatch server with heartbeat inspecting by the second task assignment server.
Said method embodiment also comprises:
130: the data reading operation in services request and/or write operation are coordinated to MySQL server by first task dispatch server;
140:MySQL server according to the coordination of task assignment server provide service data reading operation and or write operation, and start after write operation and carry out the data syn-chronization of related service with main frame.
Said method embodiment also comprises:
150: if the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server; If and/or MySQL server detects that main frame has malfunction, the service mission operations and the heartbeat inspecting operation that then replace failed host perform, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting to this failed host.
Said method embodiment also comprises:
160: if the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed; If and/or MySQL server detects that failed host recovers normal condition, then the service mission operations of normal for this recovery main frame and heartbeat inspecting operation are backcrossed.
Claims (10)
1. a management system for implementation relation type database loads equilibrium, comprises multiple MySQL servers of task assignment server and task assignment server admin, it is characterized in that:
Task assignment server, for receiving the services request of user, and divides in phase task one or more MySQL server by the service role that user asks;
MySQL server, for forming ring-type chain type framework with other MySQL server, every platform MySQL server with MySQL server above for main frame, the state of main frame is detected with heartbeat inspecting, and back up the raw data of native database, the service role that dispatch server of simultaneously executing the task is assigned.
2., according to system according to claim 1, it is characterized in that,
Data reading operation in described services request and/or write operation are coordinated to described MySQL server by described task assignment server;
Described MySQL server to described service providing data read operation and/or write operation according to the coordination of described task assignment server, and starts and carries out the data syn-chronization of related service with described main frame after described write operation.
3., according to the system described in claim 1 or 2, it is characterized in that,
Described task assignment server has two, and wherein first task dispatch server receives the services request of user, and is divided in phase by the service role that user asks and task one or more MySQL server; Second task assignment server heartbeat inspecting detects the state of first task dispatch server.
4., according to system according to claim 3, it is characterized in that,
If the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server;
If described MySQL server detects that described main frame has malfunction, then replace the service mission operations of failed host and the execution of heartbeat inspecting operation, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting operation to this failed host.
5., according to system according to claim 4, it is characterized in that,
If the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed;
If described MySQL server detects that failed host recovers normal condition, then the service mission operations of the main frame of this recovery normal condition and heartbeat inspecting operation are backcrossed.
6. a management method for implementation relation type database loads equilibrium, comprising:
Multiple stage MySQL server is formed ring-type chain type framework, every platform MySQL server for main frame with MySQL server above, detects the state of main frame, and backs up the raw data of native database with heartbeat inspecting;
Receive the services request of user by first task dispatch server, and the service role of request is divided in phase task one or more MySQL server and perform.
7. in accordance with the method for claim 6, it is characterized in that, also comprise:
Detected the state of first task dispatch server with heartbeat inspecting by the second task assignment server.
8. in accordance with the method for claim 7, it is characterized in that, also comprise:
Data reading operation in described services request and/or write operation are coordinated to described MySQL server by first task dispatch server;
Described MySQL server according to the coordination of task assignment server provide service data reading operation and or write operation, and start after described write operation and carry out the data syn-chronization of related service with described main frame.
9. in accordance with the method for claim 8, it is characterized in that, also comprise:
If the second task assignment server detects that first task dispatch server has malfunction, then replace the task assignment operation of first task dispatch server, and continue to carry out heartbeat inspecting operation to first task dispatch server; If and/or described MySQL server detects that main frame has malfunction, the service mission operations and the heartbeat inspecting operation that then replace failed host perform, the main frame setting data that change the machine is current, and the data of native database and new host data base are carried out data syn-chronization, then continue to carry out heartbeat inspecting to this failed host.
10. in accordance with the method for claim 9, it is characterized in that, also comprise:
If the second task assignment server detects that first task dispatch server recovers normal condition, then the task assignment of the server of this recovery normal condition operation is backcrossed; If and/or described MySQL server detects that failed host recovers normal condition, then the service mission operations of normal for this recovery main frame and heartbeat inspecting operation are backcrossed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410675352.7A CN104331508B (en) | 2014-11-21 | 2014-11-21 | A kind of implementation relation type database loads balanced management system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410675352.7A CN104331508B (en) | 2014-11-21 | 2014-11-21 | A kind of implementation relation type database loads balanced management system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104331508A true CN104331508A (en) | 2015-02-04 |
CN104331508B CN104331508B (en) | 2017-12-29 |
Family
ID=52406235
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410675352.7A Active CN104331508B (en) | 2014-11-21 | 2014-11-21 | A kind of implementation relation type database loads balanced management system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104331508B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105227353A (en) * | 2015-09-06 | 2016-01-06 | 深圳市华验防伪科技有限公司 | A kind of MYSQL cluster implementation method and system |
CN112817791A (en) * | 2020-12-31 | 2021-05-18 | 西安合智宇信息科技有限公司 | Mobile terminal monitoring method for mining state of working face cluster |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110084850A1 (en) * | 2009-10-13 | 2011-04-14 | National Taiwan University | Bio-Information Monitoring System |
CN103473328A (en) * | 2013-09-17 | 2013-12-25 | 中电长城网际系统应用有限公司 | MYSQL (my structured query language)-based database cloud and construction method for same |
CN103618788A (en) * | 2013-11-26 | 2014-03-05 | 曙光信息产业股份有限公司 | System high-availability method supporting B/S structure |
CN103914568A (en) * | 2014-04-24 | 2014-07-09 | 厦门市美亚柏科信息股份有限公司 | Method and device for dispatching HTTP proxy |
-
2014
- 2014-11-21 CN CN201410675352.7A patent/CN104331508B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110084850A1 (en) * | 2009-10-13 | 2011-04-14 | National Taiwan University | Bio-Information Monitoring System |
CN103473328A (en) * | 2013-09-17 | 2013-12-25 | 中电长城网际系统应用有限公司 | MYSQL (my structured query language)-based database cloud and construction method for same |
CN103618788A (en) * | 2013-11-26 | 2014-03-05 | 曙光信息产业股份有限公司 | System high-availability method supporting B/S structure |
CN103914568A (en) * | 2014-04-24 | 2014-07-09 | 厦门市美亚柏科信息股份有限公司 | Method and device for dispatching HTTP proxy |
Non-Patent Citations (1)
Title |
---|
钱勇 等: "一种高可用性集群系统的架构", 《网络与信息技术》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105227353A (en) * | 2015-09-06 | 2016-01-06 | 深圳市华验防伪科技有限公司 | A kind of MYSQL cluster implementation method and system |
CN112817791A (en) * | 2020-12-31 | 2021-05-18 | 西安合智宇信息科技有限公司 | Mobile terminal monitoring method for mining state of working face cluster |
CN112817791B (en) * | 2020-12-31 | 2024-04-26 | 西安合智宇信息科技有限公司 | Mobile terminal monitoring method for working face cluster mining state |
Also Published As
Publication number | Publication date |
---|---|
CN104331508B (en) | 2017-12-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11243981B2 (en) | Database replication based on data access scores | |
US10379956B2 (en) | Fault tolerant distributed tasks using distributed file systems | |
US10216777B2 (en) | Scalable index build techniques for column stores | |
US10216770B1 (en) | Scaling stateful clusters while maintaining access | |
US8688642B2 (en) | Systems and methods for managing application availability | |
US11663557B2 (en) | Snapshot calendar view interfaces | |
EP3598877A1 (en) | Automated self-healing database system and method for implementing the same | |
AU2017228671B2 (en) | Workload shifting in a database system using hint-based routing | |
CN107180113B (en) | Big data retrieval platform | |
Tsai et al. | Scalable architectures for SaaS | |
US8566636B2 (en) | Application recovery in a file system | |
US8984325B2 (en) | Systems and methods for disaster recovery of multi-tier applications | |
US11170023B2 (en) | Replay of redo log records in persistency or main memory of database systems | |
US20150193526A1 (en) | Schemaless data access management | |
US11048683B2 (en) | Database configuration change management | |
US8595192B1 (en) | Systems and methods for providing high availability to instance-bound databases | |
CN103150225B (en) | Disk full abnormity fault tolerance method of object parallel storage system based on application level agent | |
Jia | Google cloud computing platform technology architecture and the impact of its cost | |
CN104331508A (en) | Management system and method for realizing load balance of relational database | |
US10067949B1 (en) | Acquired namespace metadata service for controlling access to distributed file system | |
US10642823B2 (en) | Common runtime and recovery framework for manipulating data in main memory of database systems | |
Elmore et al. | Who’s driving this cloud? towards efficient migration for elastic and autonomic multitenant databases | |
US10642859B2 (en) | Database report offload server | |
US11281569B2 (en) | Self-curative computer process automates | |
US20200042407A1 (en) | Instant recovery of databases |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |