CN111930570A - Processing system and processing method for high availability of multi-computer-room database - Google Patents

Processing system and processing method for high availability of multi-computer-room database Download PDF

Info

Publication number
CN111930570A
CN111930570A CN202010825944.8A CN202010825944A CN111930570A CN 111930570 A CN111930570 A CN 111930570A CN 202010825944 A CN202010825944 A CN 202010825944A CN 111930570 A CN111930570 A CN 111930570A
Authority
CN
China
Prior art keywords
machine room
room
order
library
gateway
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.)
Pending
Application number
CN202010825944.8A
Other languages
Chinese (zh)
Inventor
张志广
彭一
李小红
喻俊
刘慧中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202010825944.8A priority Critical patent/CN111930570A/en
Publication of CN111930570A publication Critical patent/CN111930570A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The processing system and the processing method for the high availability of the multi-computer room database provided by the invention have the advantages that the two computer rooms are provided with independent and equivalent database clusters, and a slave-database-in-the-other-computer room is arranged, so that the completeness of the data copies of the two computer rooms is ensured. After a machine room processes a write request of an order, processing information of the order and a routing relation between the order and the machine room are written into a main library of the machine room, and data are synchronized to a local slave library of the machine room and a cross-machine-room slave library of the machine room through a main library master-slave data replication mode, so that the operability of processing the read request of the order by any subsequent machine room is ensured. Therefore, the application of the two machine rooms can provide services to the outside at the same time, the database clusters of the two machine rooms can also provide read-write services at the same time, and the high availability requirement is met.

Description

Processing system and processing method for high availability of multi-computer-room database
Technical Field
The invention relates to the technical field of internet, in particular to a processing system and a processing method for high availability of a multi-computer-room database.
Background
The internet company business is developed to a certain scale, and the demand for service availability is higher and higher. Especially in the financial field, there are higher requirements for availability, continuity, and strong consistency of services. Therefore, the industry has chosen multi-room deployment.
In general, multi-computer-room deployment in the industry can achieve data consistency through a data transmission and replication protocol based on a MySQL data replication mode, namely a share nothing mode. At present, the mainstream multi-computer room scheme generally adopts an application layer double-active mode and a database single-active mode, namely, the applications of two computer rooms simultaneously provide services to the outside, but only the database of one computer room provides reading and writing, the database of the other computer room only provides reading, and the databases are copied in a single direction. Based on the MHA architecture, an asynchronous replication scheme, performance is acceptable. If the consistency requirement is high, semi-synchronous replication is adopted, the two rooms are far away (more than 100 kilometers), and the performance of cross-room access has a large influence.
The existing scheme has the disadvantages of low implementation cost, less service intrusion, cross-library write operation, high consistency requirement and low performance. If the main library machine room is hung, the main library machine room can be unwritten and cannot meet the high availability requirement.
Disclosure of Invention
In view of the above, to solve the above problems, the present invention provides a processing system and a processing method for high availability of a multi-computer-room database, and the technical solution is as follows:
a multi-room database high availability processing system, the processing system comprising:
the system comprises a terminal, a scheduling server, a gateway of a machine room, a micro-service processor and a database cluster; wherein the content of the first and second substances,
the computer rooms comprise a first computer room and a second computer room, the database cluster comprises a master library, a first slave library and a second slave library, the master library and the first slave library of the first computer room are deployed in the first computer room, the second slave library of the first computer room is deployed in the second computer room, the master library and the first slave library of the second computer room are deployed in the second computer room, and the second slave library of the second computer room is deployed in the first computer room;
the terminal is used for initiating a writing request aiming at the order;
the scheduling server is used for sending the writing request of the order to a target machine room through machine room flow scheduling;
the gateway of the target machine room is used for sending the writing request of the order to the micro-service processor of the target machine room;
the micro-service processor of the target machine room is used for processing the writing request of the order; writing the processing information of the order and the routing relation between the order and the target machine room into a main library of the target machine room;
and the master library of the target machine room is used for synchronizing the processing information of the order and the routing relation to a first slave library and a second slave library of the target machine room, so that the first machine room and the second machine room respond to a reading request aiming at the order based on the routing relation to obtain the processing information of the order.
Preferably, the routing relationship includes a serial number of the order and a machine room number of the target machine room.
Preferably, the gateway of the target equipment room is further configured to:
and acquiring the state of the abnormal request processed by the micro service processor of the target machine room, and forwarding the write request received in the appointed time window to the gateway of another machine room to trigger the gateway, the micro service processor and the master library of the other machine room to execute corresponding operations under the condition that the state of the abnormal request meets the preset fusing condition.
Preferably, the gateway of the target equipment room is further configured to:
and under the condition that the writing request of the order meets a preset flow scheduling condition, forwarding the writing request of the order to a gateway of another machine room to trigger the gateway, the micro-service processor and the master library of the other machine room to execute corresponding operations.
Preferably, the processing system further comprises: a cloud server;
the micro-service processor of the machine room is used for monitoring the running state of the database cluster of the machine room and uploading the running state to the cloud server;
the cloud server is used for writing the running state corresponding to the machine room into a machine room list;
the terminal is specifically configured to:
and determining the machine room of the database cluster in an available state by calling the machine room list, and initiating a writing request of the order based on a determination result.
The scheduling server is specifically configured to:
and sending the writing request of the order to a target machine room of which the database cluster is in an available state.
Preferably, the processing system further comprises:
a first main warehouse and a second main warehouse of a third machine room;
the main library of the first machine room is used for backing up the information of the first machine room to the first main library of the third machine room;
and the main library of the second machine room is used for backing up the information of the main library of the second machine room to the second main library of the third machine room.
A processing method for high availability of a multi-computer-room database is applied to a gateway of a target computer room in a processing system for high availability of the multi-computer-room database, and comprises the following steps:
receiving a writing request aiming at an order sent by a scheduling server, wherein the writing request of the order is initiated by a terminal;
sending the writing request of the order to a micro service processor of the target machine room, so that the micro service processor of the target machine room processes the writing request of the order, writes the processing information of the order and the routing relation between the order and the target machine room into a main library of the target machine room, and synchronizes the processing information and the routing relation of the order to a first slave library and a second slave library of the target machine room, so that the first machine room and the second machine room respond to the reading request aiming at the order based on the routing relation to obtain the processing information of the order.
Preferably, the routing relationship includes a serial number of the order and a machine room number of the target machine room.
Preferably, the processing method further comprises:
and acquiring the state of the abnormal request processed by the micro service processor of the target machine room, and forwarding the write request received in the appointed time window to the gateway of another machine room to trigger the gateway, the micro service processor and the master library of the other machine room to execute corresponding operations under the condition that the state of the abnormal request meets the preset fusing condition.
Preferably, the processing method further comprises:
and under the condition that the writing request of the order meets a preset flow scheduling condition, forwarding the writing request of the order to a gateway of another machine room to trigger the gateway, the micro-service processor and the master library of the other machine room to execute corresponding operations.
The processing system and the processing method for the high availability of the multi-computer room database provided by the invention have the advantages that the two computer rooms are provided with independent and equivalent database clusters, and a slave-database-in-the-other-computer room is arranged, so that the completeness of the data copies of the two computer rooms is ensured. After a machine room processes a write request of an order, processing information of the order and a routing relation between the order and the machine room are written into a main library of the machine room, and data are synchronized to a local slave library of the machine room and a cross-machine-room slave library of the machine room through a main library master-slave data replication mode, so that the operability of processing the read request of the order by any subsequent machine room is ensured. Therefore, the application of the two machine rooms can provide services to the outside at the same time, the database clusters of the two machine rooms can also provide read-write services at the same time, and the high availability requirement is met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic structural diagram of a multi-computer-room database high availability processing system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of another exemplary embodiment of a multi-room database high availability processing system;
FIG. 3 is a schematic diagram of another embodiment of a multi-room database high availability processing system;
fig. 4 is a flowchart of a method for processing a multi-computer-room database with high availability according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The embodiment of the invention provides a high-availability processing system for a multi-computer-room database, and provides a new concept of 'application layer double-activity and database layer pseudo double-activity'. The two machine rooms are equal and stateless. The application of the two machine rooms simultaneously provides services to the outside, the database clusters of the two machine rooms also provide reading and writing services simultaneously, the databases are copied in a one-way mode, and the design idea of the database clusters of the two machine rooms is that the idea of database division is adopted. It should be noted that the database cluster in the embodiment of the present application may be MySQL.
Referring to fig. 1, a schematic diagram of a multi-room database high availability processing system is shown. The processing system comprises:
the terminal 10, the scheduling server 20, and the gateway 30, the micro service processor 40 and the database cluster 50 of the computer room; wherein the content of the first and second substances,
the computer room comprises a first computer room and a second computer room, the database cluster 50 comprises a master library 501, a first slave library 502 and a second slave library 503, the master library 501 and the first slave library 502 of the first computer room are deployed in the first computer room, the second slave library 503 of the first computer room is deployed in the second computer room, the master library 501 and the first slave library 502 of the second computer room are deployed in the second computer room, and the second slave library 503 of the second computer room is deployed in the first computer room.
A terminal 10 for initiating a write request for an order.
In order to facilitate understanding of the embodiment of the present invention, a payment service scenario is taken as an example below. The terminal 10 initiates a payment request for the order in response to a user operation.
And the scheduling server 20 is configured to send a write request of the order to the target machine room through machine room traffic scheduling.
Continuing with the payment service scenario as an example, in the embodiment of the present invention, the scheduling server 20 allocates the payment request of the order to the target machine room based on the existing traffic scheduling policy.
Specifically, in the case that the network environment of the terminal 10 is stable, the scheduling service forwards the request to the computer room to satisfy consistency, that is, in a short time, the requests (including the write request and the read request) of the same terminal 10 are fixedly scheduled to the same computer room. Therefore, the problem of inconsistency caused by database cross-machine room master-slave delay can be well solved. Write requests and read requests are processed in the database cluster 50 of the same computer room.
And the gateway 30 of the target computer room is used for sending the writing request of the order to the micro-service processor 40 of the target computer room.
Continuing with the scenario of payment service as an example, in the embodiment of the present invention, the gateway 30 of the target machine room receives the payment request of the order allocated by the dispatch server 20, and forwards the request to the micro service processor 40 for processing the payment service.
The micro-service processor 40 of the target machine room is used for processing the writing request of the order; the processing information of the order and the routing relation between the order and the target machine room are written into the main library 501 of the target machine room. Specifically, the routing relationship may include the serial number of the order and the machine room number of the target machine room, that is, a corresponding relationship between the serial number of the order and the machine room number of the target machine room is established.
Continuing to take the payment service scenario as an example, in the embodiment of the present invention, the micro service processor 40 processes the received payment request of the order based on the existing payment transaction policy, generates corresponding payment information for the order, and generates a routing relationship between the order and the target machine room where the order is located, that is, the routing relationship can indicate a corresponding relationship between the order and the target machine room where the order is processed, and the target machine room can be located through the routing relationship. Finally, the payment information and the routing relation of the order are written into the main library 501 of the target machine room.
The master library 501 of the target machine room is configured to synchronize the processing information and the routing relationship of the order to the first slave library 502 and the second slave library 503 of the target machine room, so that the first machine room and the second machine room respond to the read request for the order based on the routing relationship to obtain the processing information of the order.
Continuing to take the payment service scenario as an example, in the embodiment of the present invention, the master library 501 of the target machine room utilizes an MHA tool to implement master-slave high availability of a single machine, synchronizes the payment information and the routing relationship of the order to one slave library located in the local of the target machine room, and simultaneously synchronizes to another slave library arranged across the machine rooms by adopting a data replication mode.
It can be seen that in the present application, the first computer room and the second computer room both have independent and equivalent database clusters 50, and a slave library is set in the computer room of the other side, so as to ensure the integrity of the data copies of the two computer rooms. For example, when the first machine room processes a write request of an order, the microserver 40 of the first machine room writes the processing information and the routing relationship of the order into the master library 501 of the first machine room, and the master library 501 of the first machine room then adopts a master-slave data replication mode to synchronize the processing information and the routing relationship of the order to the local slave library of the first machine room and the slave library deployed in the second machine room.
Based on the above, whether the first machine room or the second machine room processes the order writing request, the database deployed in the respective machine room has the relevant information of all orders. Assuming that a subsequent second machine room is assigned with a read request of an order, the routing relationship of the order and corresponding processing information can be found from one slave library by reading two slave libraries deployed locally. The idea similar to the sub-library makes the two services become independent service units, independent and equal. Because cross-machine-room reading does not exist, compared with an application layer double-activity mode and a database layer single-activity mode, the method not only improves the read-write capability, but also greatly improves the usability and the continuity of the service.
In some other embodiments, in order to improve the risk resistance of the processing system, in an embodiment of the present invention, the gateway 30 of the target equipment room is further configured to:
acquiring the state of the abnormal request processed by the micro service processor 40 of the target machine room, and forwarding the write request received in the specified time window to the gateway 30 of another machine room to trigger the gateway 30, the micro service processor 40 and the master library 501 of another machine room to execute corresponding operations under the condition that the state of the abnormal request meets the preset fusing condition.
In the embodiment of the present invention, if the database cluster 50 of the target computer room is abnormal, the micro service processor of the corresponding target computer room may also be abnormal when processing the write request, thereby generating an abnormal request. The gateway 30 of the target machine room may obtain the number and/or the proportion of the abnormal requests generated by the micro service processor 40 of the machine room, if the number and/or the proportion of the abnormal requests are greater than the corresponding preset threshold (that is, the number of the abnormal requests corresponds to the preset number threshold, and the proportion of the abnormal requests corresponds to the preset proportion threshold), the gateway 30 triggers a fusing degradation mechanism, and forwards the write requests of all orders in a subsequent specified time window, for example, in 10 minutes in the future, to the gateway 30 of another machine room, so as to trigger the gateway 30, the micro service processor 40, and the main library 501 of another machine room to execute an operation for processing the write requests, where the operation is consistent with the operations of the gateway 30, the micro service processor 40, and the main library 501 of the target machine room, and is not described herein again.
Of course, after the specified time window is subsequently exceeded, the gateway 30 of the target machine room may send the write requests of the orders in a small proportion to the micro service processor 40 of the target machine room, and if the micro service processor 40 of the target machine room can normally process without generating an abnormal request, the gateway 30 of the target machine room gradually increases the order proportion of the micro service processor 40 of the target machine room until the fusing degradation mechanism is ended when the write requests of all the orders are sent to the micro service processor 40 of the target machine room. The operation of processing the write request is subsequently continued by the gateway 30, the microserver processor 40 and the master library 501 of the target room.
It should be noted that the forwarding of the write request for each order only occurs once, and is not repeated, so as to avoid the formation of dead cycles.
In other embodiments, the target room may open some traffic and dispatch the write request to another room to ensure that the system link is clear. The gateway 30 of the target machine room is further configured to:
and in the case that the write request of the order meets the preset traffic scheduling condition, forwarding the write request of the order to the gateway 30 of another machine room to trigger the gateway 30, the micro-service processor 40 and the master library 501 of the other machine room to execute corresponding operations.
In the embodiment of the present invention, the target machine room may pre-schedule a traffic scheduling condition, for example, set a time window for traffic scheduling, and then, for example, set the number of traffic scheduling, and the like, and forward the write request of the order meeting the condition from the gateway 30 of the target machine room to the gateway 30 of another machine room, so as to trigger the gateway 30, the micro service processor 40, and the master library 501 of another machine room to execute an operation of processing the write request, where the operation is consistent with the operations of the gateway 30, the micro service processor 40, and the master library 501 of the target machine room, and details are not described here.
In some other embodiments, to detect an available machine room immediately, referring to the schematic structural diagram shown in fig. 2, the processing system further includes: a cloud server 60;
the micro-service processor 40 of the machine room is used for monitoring the running state of the database cluster 50 of the machine room and uploading the running state to the cloud server 60;
the cloud server 60 is used for writing the running state corresponding to the machine room into the machine room list;
the terminal 10 is specifically configured to:
the room in which the database cluster 50 is available is determined by calling the room list, and a write request for the order is initiated based on the determination result.
The scheduling server 20 is specifically configured to:
a write request for the order is sent to the target room where the database cluster 50 is available.
In the embodiment of the present invention, the micro service processors 40 corresponding to the first machine room and the second machine room can upload the operation states of the database clusters 50 of the machine rooms to the cloud server 60, and the cloud server 60 writes the operation states of the database clusters 50 corresponding to the machine rooms into the machine room list and updates the operation states in real time. The terminal 10 can actively detect the machine room of the database cluster 50 in the available state, that is, the available machine room, based on the machine room list, so that the scheduling server 20 can specifically initiate the write request of the order and allocate the write request to the available machine room. This may improve the effectiveness of the scheduling.
In some other embodiments, the processing system may also be expanded to a "two-place-three-center" deployment scheme, referring to the schematic structural diagram shown in fig. 3, and the processing system further includes:
a first main library 701 and a second main library 702 of a third machine room;
the main library 501 of the first machine room is used for backing up the information of the first machine room to the first main library 701 of the third machine room;
the main library 501 of the second machine room is used for backing up the information thereof to the second main library 702 of the third machine room.
In the embodiment of the present invention, the main libraries of the first machine room and the second machine room may be respectively connected to two main libraries of a third machine room, that is, the third machine room is used as a disaster recovery machine room, and data of each machine room is backed up in time.
According to the processing system with the high availability of the multi-computer-room database provided by the embodiment of the invention, the two computers have independent and equivalent database clusters, and a slave-library-on-the-other-side computer room is arranged, so that the integrity of data copies of the two computers is ensured. After a machine room processes a write request of an order, processing information of the order and a routing relation between the order and the machine room are written into a main library of the machine room, and data are synchronized to a local slave library of the machine room and a cross-machine-room slave library of the machine room through a main library master-slave data replication mode, so that the operability of processing the read request of the order by any subsequent machine room is ensured. Therefore, the application of the two machine rooms can provide services to the outside at the same time, the database clusters of the two machine rooms can also provide read-write services at the same time, and the high availability requirement is met.
Based on the processing system with high availability of the multi-machine-room database provided in the above embodiment, an embodiment of the present invention further provides a processing method with high availability of the multi-machine-room database, where the processing method is applied to a gateway of a target machine room in a processing system, and a method flowchart of the processing method is shown in fig. 4, and includes:
and S10, receiving a writing request aiming at the order sent by the scheduling server, wherein the writing request of the order is initiated by the terminal.
S20, sending the writing request of the order to the micro service processor of the target machine room, so that the micro service processor of the target machine room processes the writing request of the order, writes the processing information of the order and the routing relation between the order and the target machine room into the main library of the target machine room, and further enables the main library of the target machine room to synchronize the processing information and the routing relation of the order to the first slave library and the second slave library of the target machine room, and the first machine room and the second machine room respond to the reading request aiming at the order to obtain the processing information of the order based on the routing relation.
Optionally, the routing relationship includes a serial number of the order and a machine room number of the target machine room.
Optionally, the processing method further includes:
and acquiring the state of the abnormal request processed by the micro service processor of the target machine room, and forwarding the write request received in the appointed time window to the gateway of the other machine room under the condition that the state of the abnormal request meets the preset fusing condition so as to trigger the gateway, the micro service processor and the master library of the other machine room to execute corresponding operations.
Optionally, the processing method further includes:
and under the condition that the writing request of the order meets the preset flow scheduling condition, forwarding the writing request of the order to a gateway of another machine room to trigger the gateway, the micro-service processor and the master library of the other machine room to execute corresponding operations.
According to the multi-computer-room database high-availability processing method provided by the embodiment of the invention, after a computer room processes a writing request of an order, processing information of the order and a routing relation between the order and the computer room are written into a master library of the computer room, and data are synchronized to a local slave library of the computer room and a cross-computer-room slave library through a master-slave data replication mode of the master library, so that the operability of processing a reading request of the order by any subsequent computer room is ensured. Therefore, the application of the two machine rooms can provide services to the outside at the same time, the database clusters of the two machine rooms can also provide read-write services at the same time, and the high availability requirement is met.
The above detailed description is provided for the processing system and the processing method with high availability of the multi-computer-room database, and the specific examples are applied herein to illustrate the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A multi-room database high availability processing system, the processing system comprising:
the system comprises a terminal, a scheduling server, a gateway of a machine room, a micro-service processor and a database cluster; wherein the content of the first and second substances,
the computer rooms comprise a first computer room and a second computer room, the database cluster comprises a master library, a first slave library and a second slave library, the master library and the first slave library of the first computer room are deployed in the first computer room, the second slave library of the first computer room is deployed in the second computer room, the master library and the first slave library of the second computer room are deployed in the second computer room, and the second slave library of the second computer room is deployed in the first computer room;
the terminal is used for initiating a writing request aiming at the order;
the scheduling server is used for sending the writing request of the order to a target machine room through machine room flow scheduling;
the gateway of the target machine room is used for sending the writing request of the order to the micro-service processor of the target machine room;
the micro-service processor of the target machine room is used for processing the writing request of the order; writing the processing information of the order and the routing relation between the order and the target machine room into a main library of the target machine room;
and the master library of the target machine room is used for synchronizing the processing information of the order and the routing relation to a first slave library and a second slave library of the target machine room, so that the first machine room and the second machine room respond to a reading request aiming at the order based on the routing relation to obtain the processing information of the order.
2. The processing system of claim 1, wherein the routing relationship comprises a serial number of the order and a machine room number of the target machine room.
3. The processing system of claim 1, wherein the gateway of the target room is further configured to:
and acquiring the state of the abnormal request processed by the micro service processor of the target machine room, and forwarding the write request received in the appointed time window to the gateway of another machine room to trigger the gateway, the micro service processor and the master library of the other machine room to execute corresponding operations under the condition that the state of the abnormal request meets the preset fusing condition.
4. The processing system of claim 1, wherein the gateway of the target room is further configured to:
and under the condition that the writing request of the order meets a preset flow scheduling condition, forwarding the writing request of the order to a gateway of another machine room to trigger the gateway, the micro-service processor and the master library of the other machine room to execute corresponding operations.
5. The processing system of claim 1, further comprising: a cloud server;
the micro-service processor of the machine room is used for monitoring the running state of the database cluster of the machine room and uploading the running state to the cloud server;
the cloud server is used for writing the running state corresponding to the machine room into a machine room list;
the terminal is specifically configured to:
determining a machine room of a database cluster in an available state by calling the machine room list, and initiating a writing request of the order based on a determination result;
the scheduling server is specifically configured to:
and sending the writing request of the order to a target machine room of which the database cluster is in an available state.
6. The processing system of claim 1, further comprising:
a first main warehouse and a second main warehouse of a third machine room;
the main library of the first machine room is used for backing up the information of the first machine room to the first main library of the third machine room;
and the main library of the second machine room is used for backing up the information of the main library of the second machine room to the second main library of the third machine room.
7. A processing method for high availability of a multi-machine-room database is applied to a gateway of a target machine room in a processing system for high availability of the multi-machine-room database, and comprises the following steps:
receiving a writing request aiming at an order sent by a scheduling server, wherein the writing request of the order is initiated by a terminal;
sending the writing request of the order to a micro service processor of the target machine room, so that the micro service processor of the target machine room processes the writing request of the order, writes the processing information of the order and the routing relation between the order and the target machine room into a main library of the target machine room, and synchronizes the processing information and the routing relation of the order to a first slave library and a second slave library of the target machine room, so that the first machine room and the second machine room respond to the reading request aiming at the order based on the routing relation to obtain the processing information of the order.
8. The processing method according to claim 7, wherein the routing relationship comprises a serial number of the order and a machine room number of the target machine room.
9. The processing method according to claim 7, characterized in that it further comprises:
and acquiring the state of the abnormal request processed by the micro service processor of the target machine room, and forwarding the write request received in the appointed time window to the gateway of another machine room to trigger the gateway, the micro service processor and the master library of the other machine room to execute corresponding operations under the condition that the state of the abnormal request meets the preset fusing condition.
10. The processing method according to claim 7, characterized in that it further comprises:
and under the condition that the writing request of the order meets a preset flow scheduling condition, forwarding the writing request of the order to a gateway of another machine room to trigger the gateway, the micro-service processor and the master library of the other machine room to execute corresponding operations.
CN202010825944.8A 2020-08-17 2020-08-17 Processing system and processing method for high availability of multi-computer-room database Pending CN111930570A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010825944.8A CN111930570A (en) 2020-08-17 2020-08-17 Processing system and processing method for high availability of multi-computer-room database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010825944.8A CN111930570A (en) 2020-08-17 2020-08-17 Processing system and processing method for high availability of multi-computer-room database

Publications (1)

Publication Number Publication Date
CN111930570A true CN111930570A (en) 2020-11-13

Family

ID=73311034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010825944.8A Pending CN111930570A (en) 2020-08-17 2020-08-17 Processing system and processing method for high availability of multi-computer-room database

Country Status (1)

Country Link
CN (1) CN111930570A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653753A (en) * 2020-12-18 2021-04-13 平安银行股份有限公司 RPC-based multi-room independent multi-activity method and system and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425645A (en) * 2012-05-14 2013-12-04 阿里巴巴集团控股有限公司 Monitoring system and monitoring method for single point of failure of database cluster
CN106156318A (en) * 2016-07-05 2016-11-23 武汉斗鱼网络科技有限公司 A kind of system and method realizing multinode data base's High Availabitity
US20180121304A1 (en) * 2016-10-27 2018-05-03 Machine Zone, Inc. System and method for managing a cluster of cache servers (trask)
CN109241110A (en) * 2018-08-24 2019-01-18 北京京东尚科信息技术有限公司 Order management method and system, electronic equipment, storage medium
CN109508912A (en) * 2018-12-29 2019-03-22 广州虎牙信息科技有限公司 A kind of business scheduling method, device, equipment and storage medium
CN110990432A (en) * 2019-11-18 2020-04-10 北京禧云信息科技有限公司 Device and method for synchronizing distributed cache clusters across machine rooms

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103425645A (en) * 2012-05-14 2013-12-04 阿里巴巴集团控股有限公司 Monitoring system and monitoring method for single point of failure of database cluster
CN106156318A (en) * 2016-07-05 2016-11-23 武汉斗鱼网络科技有限公司 A kind of system and method realizing multinode data base's High Availabitity
US20180121304A1 (en) * 2016-10-27 2018-05-03 Machine Zone, Inc. System and method for managing a cluster of cache servers (trask)
CN109241110A (en) * 2018-08-24 2019-01-18 北京京东尚科信息技术有限公司 Order management method and system, electronic equipment, storage medium
CN109508912A (en) * 2018-12-29 2019-03-22 广州虎牙信息科技有限公司 A kind of business scheduling method, device, equipment and storage medium
CN110990432A (en) * 2019-11-18 2020-04-10 北京禧云信息科技有限公司 Device and method for synchronizing distributed cache clusters across machine rooms

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张蕾;: "企业微服务分布式体系构建及高可用性探索", 电子元器件与信息技术, no. 04, 20 April 2020 (2020-04-20) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112653753A (en) * 2020-12-18 2021-04-13 平安银行股份有限公司 RPC-based multi-room independent multi-activity method and system and electronic equipment
CN112653753B (en) * 2020-12-18 2023-04-07 平安银行股份有限公司 RPC-based multi-room independent multi-activity method and system and electronic equipment

Similar Documents

Publication Publication Date Title
US8788768B2 (en) Maintaining mirror and storage system copies of volumes at multiple remote sites
US9557925B1 (en) Thin replication
US7188125B1 (en) Replication using a special off-host network device
US9256605B1 (en) Reading and writing to an unexposed device
US8209282B2 (en) Method, system, and article of manufacture for mirroring data at storage locations
US8151062B2 (en) Consistency models in a distributed store
JP4594928B2 (en) Flashback database
WO2018103318A1 (en) Distributed transaction handling method and system
US7043665B2 (en) Method, system, and program for handling a failover to a remote storage location
US8464101B1 (en) CAS command network replication
US20080052327A1 (en) Secondary Backup Replication Technique for Clusters
JP2009157785A (en) Method for adding standby computer, computer and computer system
CN107257957B (en) Application cache replication to secondary applications
CN108833479B (en) Data synchronization method and device
EP3019960A2 (en) Replication of data between mirrored data sites
US10534796B1 (en) Maintaining an active-active cloud across different types of cloud storage services
US11768624B2 (en) Resilient implementation of client file operations and replication
CN106605217A (en) Application transparent continuous availability using synchronous replication across data stores in failover cluster
JP2011210107A (en) Message queue management system, lock server, message queue management method, and message queue management program
CN111930570A (en) Processing system and processing method for high availability of multi-computer-room database
US10169441B2 (en) Synchronous data replication in a content management system
JP2011210106A (en) Message queue management system, lock server, message queue management method, and message queue management program
CN112805949B (en) Method for processing snapshot creation request and storage device
CN116339609A (en) Data processing method and storage device
CN110413686A (en) A kind of method for writing data, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination