CN111444062A - Method and device for managing master node and slave node of cloud database - Google Patents

Method and device for managing master node and slave node of cloud database Download PDF

Info

Publication number
CN111444062A
CN111444062A CN202010250427.2A CN202010250427A CN111444062A CN 111444062 A CN111444062 A CN 111444062A CN 202010250427 A CN202010250427 A CN 202010250427A CN 111444062 A CN111444062 A CN 111444062A
Authority
CN
China
Prior art keywords
node
address
slave
slave node
management network
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
Application number
CN202010250427.2A
Other languages
Chinese (zh)
Other versions
CN111444062B (en
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.)
Shandong Huimao Electronic Port Co Ltd
Original Assignee
Shandong Huimao Electronic Port 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 Shandong Huimao Electronic Port Co Ltd filed Critical Shandong Huimao Electronic Port Co Ltd
Priority to CN202010250427.2A priority Critical patent/CN111444062B/en
Publication of CN111444062A publication Critical patent/CN111444062A/en
Application granted granted Critical
Publication of CN111444062B publication Critical patent/CN111444062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Abstract

The invention provides a method and a device for managing a master node and a slave node of a cloud database, wherein the method comprises the following steps: allocating a first address in a management network and a second address in a service network to the master node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with the cloud database through the master node; allocating a third address in the management network and a fourth address in the service network for the slave node; monitoring the main node through a management network according to the first address; monitoring the slave node through the management network according to the third address; and when the master node and the slave node carry out data synchronization, controlling the master node and the slave node to carry out data synchronization according to the second address and the fourth address. The scheme can synchronize data without increasing the load of a management network.

Description

Method and device for managing master node and slave node of cloud database
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for managing a master node and a slave node of a cloud database.
Background
With the rise of cloud computing concepts in recent years, databases are gradually migrated to cloud computing platforms, becoming cloud databases. For example, the Redis cloud database is a non-relational memory database, is a high-performance open-source key-value database, has very high read-write performance and diverse and flexible data models, and is widely used in various internet projects.
At present, when switching between master and slave nodes is performed in a Redis system, a node state can be monitored on a user side through a service network, data synchronization is realized by using the service network, and data synchronization can also be realized on a service side through a management network by monitoring the node state through the management network.
As can be seen from the above description, when the Redis system performs master-slave node switching, the service side cannot perform uniform management by monitoring the node state through the service network at the user side, and monitors the node operation state through the management network at the service side, which causes a large load on the management network when performing data synchronization due to low bandwidth of the management network.
Disclosure of Invention
The embodiment of the invention provides a method and a device for managing a master node and a slave node of a cloud database, which can synchronize data without increasing the load of a management network.
In a first aspect, the present invention provides a method for managing a master node and a slave node of a cloud database, which is applied to a server and includes:
allocating a first address in a management network and a second address in a service network to a master node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with a cloud database through the master node;
allocating a third address in the management network and a fourth address in the service network for a slave node;
monitoring the main node through the management network according to the first address;
monitoring the slave node through the management network according to the third address;
and when the master node and the slave node carry out data synchronization, controlling the master node and the slave node to carry out data synchronization according to the second address and the fourth address.
Preferably, the first and second electrodes are formed of a metal,
the monitoring the master node through the management network according to the first address includes:
accessing the first address, and acquiring the operation information of the main node from the first address;
the monitoring the slave node through the management network according to the third address includes:
and accessing the third address, and acquiring the operation information of the slave node from the third address.
Preferably, the first and second electrodes are formed of a metal,
the controlling the master node and the slave node to perform data synchronization according to the second address and the fourth address includes:
and controlling the master node to synchronize the data to be synchronized to the fourth address through the second address.
Preferably, the first and second electrodes are formed of a metal,
after the monitoring the slave node through the management network according to the third address, further comprising:
determining whether a node switch between the master node and the slave node is required;
when the switching between the main node and the slave node is needed, the main node is unbound from a virtual IP address VIP, the slave node is bound with the VIP, and the switching between the main node and the slave node is realized; and the node bound with the VIP is a main node, and the user side accesses the main node through the VIP.
In a second aspect, the present invention provides an apparatus for managing a master node and a slave node of a cloud database, including:
the distribution module is used for distributing a first address in a management network and a second address in a service network for the main node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with the cloud database through the main node; allocating a third address in the management network and a fourth address in the service network for a slave node;
the monitoring module is used for monitoring the main node through the management network according to the first address distributed by the distribution module; monitoring the slave node through the management network according to the third address distributed by the distribution module;
and the data synchronization module is used for controlling the main node and the slave node to carry out data synchronization according to the second address and the fourth address when the main node and the slave node carry out data synchronization.
Preferably, the first and second electrodes are formed of a metal,
the monitoring module is used for accessing the first address and acquiring the operation information of the main node from the first address; and accessing the third address, and acquiring the operation information of the slave node from the third address.
Preferably, the first and second electrodes are formed of a metal,
and the data synchronization module is used for controlling the master node to synchronize the data to be synchronized to the fourth address through the second address.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
the processing module is used for determining whether the node switching between the main node and the slave node needs to be carried out or not; when the switching between the main node and the slave node is needed, the main node is unbound from a virtual IP address VIP, the slave node is bound with the VIP, and the switching between the main node and the slave node is realized; and the node bound with the VIP is a main node, and the user side accesses the main node through the VIP.
In a third aspect, the present invention provides an apparatus for managing a master node and a slave node of a cloud database, including: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the method of any of the first aspects.
In a third aspect, the present invention provides a computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the method of any of the first aspects.
The embodiment of the invention provides a method and a device for managing a master node and a slave node of a cloud database, wherein when a user side monitors the master node and the slave node through a service network, a server side cannot monitor related conditions, each user needs to be monitored independently, and the master node and the slave node cannot be monitored and managed uniformly. Based on this, a first address in the management network and a second address in the service network may be allocated to the master node, a third address in the management network and a fourth address in the service network may be allocated to the slave node, the master node may be monitored through the management network according to the first address, the slave node may be monitored through the management network according to the third address, and when the master node and the slave node synchronize data, the master node and the slave node may be controlled to perform data synchronization according to the second address and the fourth address. By the mode, data synchronization can be realized through the service network without increasing the load of the management network.
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 introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart of a method for managing a master node and a slave node of a cloud database according to an embodiment of the present invention;
fig. 2 is a flowchart of another method for managing a master node and a slave node of a cloud database according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an apparatus for managing a master node and a slave node of a cloud database according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another apparatus for managing master nodes and slave nodes of a cloud database according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for managing a master node and a slave node of a cloud database, where the method may include the following steps:
step 101: allocating a first address in a management network and a second address in a service network to the master node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with the cloud database through the master node;
step 102: allocating a third address in the management network and a fourth address in the service network for the slave node;
step 103: monitoring the main node through a management network according to the first address;
step 104: monitoring the slave node through the management network according to the third address;
step 105: and when the master node and the slave node carry out data synchronization, controlling the master node and the slave node to carry out data synchronization according to the second address and the fourth address.
In the embodiment of the present invention, when the user side monitors the master node and the slave node through the service network, the server side cannot monitor the relevant conditions, and each user needs to be monitored separately, and cannot perform monitoring management uniformly, and when the server side monitors the master node and the slave node through the management network, data synchronization needs to be performed through the management network, however, the management network has a low bandwidth, which may cause an excessive load on the management network, so that the master node and the slave node can be monitored through the management network to achieve uniform management of the management network, and when data synchronization needs to be performed, data synchronization is performed through controlling the master node and the slave node through the service network. Based on this, a first address in the management network and a second address in the service network may be allocated to the master node, a third address in the management network and a fourth address in the service network may be allocated to the slave node, the master node may be monitored through the management network according to the first address, the slave node may be monitored through the management network according to the third address, and when the master node and the slave node synchronize data, the master node and the slave node may be controlled to perform data synchronization according to the second address and the fourth address. By the mode, data synchronization can be realized through the service network without increasing the load of the management network.
In order to implement monitoring on the master node and the slave node through the management network, step 103 in the foregoing embodiment monitors the master node through the management network according to the first address, and includes: accessing the first address, and acquiring the operation information of the main node from the first address;
step 104 in the foregoing embodiment monitors the slave node through the management network according to the third address, including:
and accessing the third address, and acquiring the operation information of the slave node from the third address.
In an embodiment of the present invention, based on the first address in the management network and the second address in the service network allocated to the master node, the third address in the management network and the fourth address in the service network allocated to the slave node, the operation information of the master node may be obtained by accessing the first address (for example, an IP address), and the operation information of the slave node may be obtained by accessing the third address, so that the master node and the slave node are uniformly monitored through the management network.
In order to implement data synchronization between the master node and the slave node, step 105 in the foregoing embodiment controls the master node and the slave node to perform data synchronization according to the second address and the fourth address, which may specifically be implemented as follows:
and the control master node synchronizes the data to be synchronized to the fourth address through the second address.
In an embodiment of the present invention, the slave node may serve as a standby node and needs to perform data synchronization with the master node, so that it is avoided that the master node acquires data through the slave node when the state is abnormal, and data loss is avoided. Based on the second address and the fourth address assigned to the master node and the slave node, the master node and the slave node can be controlled to perform data synchronization according to the second address and the fourth address.
In order to implement master-slave switching, after monitoring the slave node through the management network according to the third address, the foregoing embodiment further includes:
determining whether node switching between a master node and a slave node is required;
when the switching between the main node and the slave node is needed, the main node and the virtual IP address VIP are unbound, and the switching between the main node and the slave node is realized; and the user side accesses the main node through the VIP.
In an embodiment of the present invention, the management network monitors the operation information of the master node and the slave node in real time through the first address and the third address, accesses the master node through the virtual IP address VIP based on the service data, and when it is determined that a node switching between the master node and the slave node is required (for example, the master node goes down), the slave node may be bound to the VIP, and the master node and the VIP may be unbound, so that the node switching between the master node and the slave node is realized, and the normal operation of the system is ensured.
The invention can carry out the master-slave switching of the cross network, such as a redis system, and can uniformly deploy the monitor at the server, thereby facilitating the uniform monitoring and management; a management network IP can be added on the Redis node, and the management network IP and the service network IP are mapped with each other; associating the management network IP with the service network IP through Map containers, wherein the management network IP is used as Key, and the service network IP is used as Value; the service network IP can be found through the management network IP, and when the node switching of the master node and the slave node occurs, the monitor can set the master node service network IP for the slave node, so that the data synchronization can be ensured to walk around the service network with high bandwidth; at the server side, the monitor can directly monitor the operation condition of each node through the management network IP.
As shown in fig. 2, in order to more clearly illustrate the technical solution and advantages of the present invention, the following describes in detail a method for managing a master node and a slave node of a cloud database provided in an embodiment of the present invention, and specifically may include the following steps:
step 201: and allocating a first address in a management network and a second address in a service network to the master node, wherein the management network is used by the server side, the service network is used by the user side, and the user side interacts with the cloud database through the master node.
Step 202: the slave node is assigned a third address in the management network and a fourth address in the service network.
Step 203: and accessing the first address and acquiring the operation information of the main node from the first address.
Step 204: and accessing the third address, and acquiring the operation information of the slave node from the third address.
Specifically, in the Redis system, a party of a tenant purchasing a Redis product service is a user side, and a network where the tenant purchases the Redis product service is a VPC (Virtual Private network) service network. One party renting Redis product service is a service end, and a network used by the service end is a management network.
For example, a management network IP may be added to the master node and the slave node, the management network IP is mapped with the service network IP, the monitor is uniformly deployed at the server, and the monitoring effect is achieved by monitoring the node management network IP, that is, the operation information of the master node is obtained by accessing the first address, and the operation information of the slave node is obtained by accessing the third address.
Step 205: it is determined whether a node switch between the master node and the slave node needs to be performed.
Step 206: when the switching between the main node and the slave node is needed, the main node and the virtual IP address VIP are unbound, the slave node and the VIP are bound, and the switching between the main node and the slave node is realized; and the user side accesses the main node through the VIP.
Specifically, Map containers can be used to implement mutual mapping between the management network IP and the service network IP, where the management network IP is used as Key and the service network IP is used as Value, so that the service network IP can be found through the management network IP, and when master-slave switching occurs, the monitor can set the master node service network IP for the slave node, thereby ensuring that data synchronization can lead to a service network with high bandwidth. When master-slave switching occurs, because the management network IP of each node is associated with the service network IP, a Map container class is used, the service network IP is found through the management network IP, data synchronization among nodes is carried out by utilizing the service network IP, a slave node is set to be the master node service network IP during master-slave switching, and meanwhile, a monitor can monitor the operation state of the node through the management network IP at a server side.
For example, when the monitor detects that a primary node is down, the monitor will unbind the primary node from the VIP and will bind the node to the VIP.
Step 207: and when the master node and the slave node carry out data synchronization, controlling the master node to synchronize the data to be synchronized to the fourth address through the second address.
As shown in fig. 3, an apparatus for managing a master node and a slave node of a cloud database according to an embodiment of the present invention includes:
the distribution module 301 is configured to distribute a first address in a management network and a second address in a service network to the master node, where the management network is a network used by a server, the service network is a network used by a user, and the user interacts with the cloud database through the master node; allocating a third address in the management network and a fourth address in the service network for the slave node;
a monitoring module 302, configured to monitor the master node through the management network according to the first address allocated by the allocating module 301; monitoring the slave node through a management network according to the third address distributed by the distribution module;
and a data synchronization module 303, configured to control the master node and the slave node to perform data synchronization according to the second address and the fourth address allocated by the allocation module 301 when the master node and the slave node perform data synchronization.
In the embodiment of the invention, when the user side monitors the master node and the slave node through the service network, the server side cannot monitor related conditions, each user needs to be monitored independently, the monitoring management cannot be performed uniformly, and when the server side monitors the master node and the slave node through the management network, the data synchronization needs to be performed through the management network, however, the management network has low bandwidth, which causes overlarge load on the management network. Based on the method, a first address in a management network and a second address in a service network can be allocated to a master node through an allocation module, a third address in the management network and a fourth address in the service network are allocated to a slave node, the master node is monitored through the management network according to the first address through a monitoring module, the slave node is monitored through the management network according to the third address, and when the master node and the slave node are in data synchronization, the master node and the slave node are controlled to perform data synchronization according to the second address and the fourth address. By the mode, data synchronization can be realized through the service network without increasing the load of the management network.
In an embodiment of the present invention, the monitoring module 302 is configured to access a first address, and obtain operation information of a host node from the first address; and accessing the third address, and acquiring the operation information of the slave node from the third address.
In an embodiment of the present invention, the data synchronization module 303 is configured to control the master node to synchronize the data to be synchronized to the fourth address through the second address.
Based on the apparatus for managing a master node and a slave node of a cloud database shown in fig. 3, as shown in fig. 4, in an embodiment of the present invention, the apparatus further includes:
a processing module 304, configured to determine whether node switching between the master node and the slave node is required; when the switching between the main node and the slave node is needed, the main node and the virtual IP address VIP are unbound, the slave node and the VIP are bound, and the switching between the main node and the slave node is realized; and the user side accesses the main node through the VIP.
It is to be understood that the illustrated structure of the embodiment of the present invention does not constitute a specific limitation to the database system management apparatus. In other embodiments of the invention, the database system management apparatus may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
The embodiment of the invention also provides a device for managing the master node and the slave node of the cloud database, which comprises the following steps: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the database system management method in any embodiment of the present invention.
An embodiment of the present invention further provides a computer-readable medium, where the computer-readable medium stores computer instructions, and when the computer instructions are executed by a processor, the processor is caused to execute the database system management method in any embodiment of the present invention. Specifically, a system or an apparatus equipped with a storage medium on which software program codes that realize the functions of any of the above-described embodiments are stored may be provided, and a computer (or a CPU or MPU) of the system or the apparatus is caused to read out and execute the program codes stored in the storage medium.
In this case, the program code itself read from the storage medium can realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
Examples of the storage medium for supplying the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (e.g., CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD + RW), a magnetic tape, a nonvolatile memory card, and a ROM. Alternatively, the program code may be downloaded from a server computer via a communications network.
Further, it should be clear that the functions of any one of the above-described embodiments may be implemented not only by executing the program code read out by the computer, but also by causing an operating system or the like operating on the computer to perform a part or all of the actual operations based on instructions of the program code.
Further, it is to be understood that the program code read out from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion unit connected to the computer, and then causes a CPU or the like mounted on the expansion board or the expansion unit to perform part or all of the actual operations based on instructions of the program code, thereby realizing the functions of any of the above-described embodiments.
The embodiments of the invention have at least the following beneficial effects:
1. in the embodiment of the present invention, when the user side monitors the master node and the slave node through the service network, the server side cannot monitor the relevant conditions, and each user needs to be monitored separately, and cannot perform monitoring management uniformly, and when the server side monitors the master node and the slave node through the management network, data synchronization needs to be performed through the management network, however, the management network has a low bandwidth, which may cause an excessive load on the management network, so that the master node and the slave node can be monitored through the management network to achieve uniform management of the management network, and when data synchronization needs to be performed, data synchronization is performed through controlling the master node and the slave node through the service network. Based on this, a first address in the management network and a second address in the service network may be allocated to the master node, a third address in the management network and a fourth address in the service network may be allocated to the slave node, the master node may be monitored through the management network according to the first address, the slave node may be monitored through the management network according to the third address, and when the master node and the slave node synchronize data, the master node and the slave node may be controlled to perform data synchronization according to the second address and the fourth address. By the mode, data synchronization can be realized through the service network without increasing the load of the management network;
2. in an embodiment of the present invention, based on a first address in a management network and a second address in a service network allocated to a master node, a third address in the management network and a fourth address in the service network allocated to a slave node, the operation information of the master node may be obtained by accessing the first address (for example, an IP address), and the operation information of the slave node may be obtained by accessing the third address, so that the master node and the slave node are uniformly monitored through the management network;
3. in an embodiment of the present invention, the slave node may serve as a standby node and needs to perform data synchronization with the master node, so that it is avoided that the master node acquires data through the slave node when the state is abnormal, and data loss is avoided. Based on the second address and the fourth address assigned to the master node and the slave node, the master node and the slave node can be controlled to perform data synchronization according to the second address and the fourth address.
It should be noted that not all steps and modules in the above flows and system structure diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of the steps is not fixed and can be adjusted as required. The system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by a plurality of physical entities, or some components in a plurality of independent devices may be implemented together.
In the above embodiments, the hardware unit may be implemented mechanically or electrically. For example, a hardware element may comprise permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware elements may also comprise programmable logic or circuitry, such as a general purpose processor or other programmable processor, that may be temporarily configured by software to perform the corresponding operations. The specific implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been shown and described in detail in the drawings and in the preferred embodiments, it is not intended to limit the invention to the embodiments disclosed, and it will be apparent to those skilled in the art that various combinations of the code auditing means in the various embodiments described above may be used to obtain further embodiments of the invention, which are also within the scope of the invention.

Claims (10)

1. The method for managing the master node and the slave node of the cloud database is characterized by being applied to a server side and comprising the following steps:
allocating a first address in a management network and a second address in a service network to a master node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with a cloud database through the master node;
allocating a third address in the management network and a fourth address in the service network for a slave node;
monitoring the main node through the management network according to the first address;
monitoring the slave node through the management network according to the third address;
and when the master node and the slave node carry out data synchronization, controlling the master node and the slave node to carry out data synchronization according to the second address and the fourth address.
2. The method of claim 1,
the monitoring the master node through the management network according to the first address includes:
accessing the first address, and acquiring the operation information of the main node from the first address;
the monitoring the slave node through the management network according to the third address includes:
and accessing the third address, and acquiring the operation information of the slave node from the third address.
3. The method of claim 1,
the controlling the master node and the slave node to perform data synchronization according to the second address and the fourth address includes:
and controlling the master node to synchronize the data to be synchronized to the fourth address through the second address.
4. The method according to any one of claims 1 to 3,
after the monitoring the slave node through the management network according to the third address, further comprising:
determining whether a node switch between the master node and the slave node is required;
when the switching between the main node and the slave node is needed, the main node is unbound from a virtual IP address VIP, the slave node is bound with the VIP, and the switching between the main node and the slave node is realized; and the node bound with the VIP is a main node, and the user side accesses the main node through the VIP.
5. An apparatus for managing master and slave nodes of a cloud database, comprising:
the distribution module is used for distributing a first address in a management network and a second address in a service network for the main node, wherein the management network is a network used by a server side, the service network is a network used by a user side, and the user side interacts with the cloud database through the main node; allocating a third address in the management network and a fourth address in the service network for a slave node;
the monitoring module is used for monitoring the main node through the management network according to the first address distributed by the distribution module; monitoring the slave node through the management network according to the third address distributed by the distribution module;
and the data synchronization module is used for controlling the main node and the slave node to carry out data synchronization according to the second address and the fourth address when the main node and the slave node carry out data synchronization.
6. The apparatus of claim 5,
the monitoring module is used for accessing the first address and acquiring the operation information of the main node from the first address; and accessing the third address, and acquiring the operation information of the slave node from the third address.
7. The apparatus of claim 5,
and the data synchronization module is used for controlling the master node to synchronize the data to be synchronized to the fourth address through the second address.
8. The apparatus according to any one of claims 5 to 7,
further comprising:
the processing module is used for determining whether the node switching between the main node and the slave node needs to be carried out or not; when the switching between the main node and the slave node is needed, the main node is unbound from a virtual IP address VIP, the slave node is bound with the VIP, and the switching between the main node and the slave node is realized; and the node bound with the VIP is a main node, and the user side accesses the main node through the VIP.
9. An apparatus for managing master and slave nodes of a cloud database, comprising: at least one memory and at least one processor;
the at least one memory to store a machine readable program;
the at least one processor, configured to invoke the machine readable program to perform the method of any of claims 1 to 4.
10. Computer readable medium, characterized in that it has stored thereon computer instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 4.
CN202010250427.2A 2020-04-01 2020-04-01 Method and device for managing master node and slave node of cloud database Active CN111444062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010250427.2A CN111444062B (en) 2020-04-01 2020-04-01 Method and device for managing master node and slave node of cloud database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010250427.2A CN111444062B (en) 2020-04-01 2020-04-01 Method and device for managing master node and slave node of cloud database

Publications (2)

Publication Number Publication Date
CN111444062A true CN111444062A (en) 2020-07-24
CN111444062B CN111444062B (en) 2023-09-19

Family

ID=71649544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010250427.2A Active CN111444062B (en) 2020-04-01 2020-04-01 Method and device for managing master node and slave node of cloud database

Country Status (1)

Country Link
CN (1) CN111444062B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910694A (en) * 2021-01-22 2021-06-04 苏州浪潮智能科技有限公司 Method, system and medium for transmitting filing log

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633538B1 (en) * 1998-01-30 2003-10-14 Fujitsu Limited Node representation system, node monitor system, the methods and storage medium
JP2004007072A (en) * 2002-05-30 2004-01-08 Toshiba Corp Network address management device, program thereof, and handover method in radio communications
CN101060391A (en) * 2007-05-16 2007-10-24 华为技术有限公司 Master and spare server switching method and system and master server and spare server
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
US20140325256A1 (en) * 2013-04-25 2014-10-30 Netapp, Inc. Systems and methods for managing disaster recovery in a storage system
US20160085650A1 (en) * 2013-03-04 2016-03-24 Netapp Inc. Systems and methods for resynchronizing mirroring partners in a storage system
US20160283335A1 (en) * 2015-03-24 2016-09-29 Xinyu Xingbang Information Industry Co., Ltd. Method and system for achieving a high availability and high performance database cluster
CN106850269A (en) * 2016-12-29 2017-06-13 曙光信息产业(北京)有限公司 A kind of management system of cloud platform
CN107181834A (en) * 2017-06-13 2017-09-19 聚好看科技股份有限公司 A kind of redis manages method, device and the redis systems of virtual ip address
CN108234170A (en) * 2016-12-15 2018-06-29 北京神州泰岳软件股份有限公司 The monitoring method and device of a kind of server cluster
CN108628717A (en) * 2018-03-02 2018-10-09 北京辰森世纪科技股份有限公司 A kind of Database Systems and monitoring method
CN109101196A (en) * 2018-08-14 2018-12-28 北京奇虎科技有限公司 Host node switching method, device, electronic equipment and computer storage medium
CN109254876A (en) * 2018-09-11 2019-01-22 郑州云海信息技术有限公司 The management method and device of database in cloud computing system
CN110224871A (en) * 2019-06-21 2019-09-10 深圳前海微众银行股份有限公司 A kind of high availability method and device of Redis cluster
WO2019184116A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Method and device for automatically building kubernetes main node, terminal device and computer-readable storage medium
CN110659262A (en) * 2019-09-20 2020-01-07 聚好看科技股份有限公司 Master-slave switching method and device for redis node
CN110674192A (en) * 2019-10-09 2020-01-10 浪潮云信息技术有限公司 Redis high-availability VIP (very important person) drifting method, terminal and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6633538B1 (en) * 1998-01-30 2003-10-14 Fujitsu Limited Node representation system, node monitor system, the methods and storage medium
JP2004007072A (en) * 2002-05-30 2004-01-08 Toshiba Corp Network address management device, program thereof, and handover method in radio communications
CN101060391A (en) * 2007-05-16 2007-10-24 华为技术有限公司 Master and spare server switching method and system and master server and spare server
CN103077242A (en) * 2013-01-11 2013-05-01 北京佳讯飞鸿电气股份有限公司 Method for hot standby of dual database servers
US20160085650A1 (en) * 2013-03-04 2016-03-24 Netapp Inc. Systems and methods for resynchronizing mirroring partners in a storage system
US20140325256A1 (en) * 2013-04-25 2014-10-30 Netapp, Inc. Systems and methods for managing disaster recovery in a storage system
US20160283335A1 (en) * 2015-03-24 2016-09-29 Xinyu Xingbang Information Industry Co., Ltd. Method and system for achieving a high availability and high performance database cluster
CN108234170A (en) * 2016-12-15 2018-06-29 北京神州泰岳软件股份有限公司 The monitoring method and device of a kind of server cluster
CN106850269A (en) * 2016-12-29 2017-06-13 曙光信息产业(北京)有限公司 A kind of management system of cloud platform
CN107181834A (en) * 2017-06-13 2017-09-19 聚好看科技股份有限公司 A kind of redis manages method, device and the redis systems of virtual ip address
CN108628717A (en) * 2018-03-02 2018-10-09 北京辰森世纪科技股份有限公司 A kind of Database Systems and monitoring method
WO2019184116A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Method and device for automatically building kubernetes main node, terminal device and computer-readable storage medium
CN109101196A (en) * 2018-08-14 2018-12-28 北京奇虎科技有限公司 Host node switching method, device, electronic equipment and computer storage medium
CN109254876A (en) * 2018-09-11 2019-01-22 郑州云海信息技术有限公司 The management method and device of database in cloud computing system
CN110224871A (en) * 2019-06-21 2019-09-10 深圳前海微众银行股份有限公司 A kind of high availability method and device of Redis cluster
CN110659262A (en) * 2019-09-20 2020-01-07 聚好看科技股份有限公司 Master-slave switching method and device for redis node
CN110674192A (en) * 2019-10-09 2020-01-10 浪潮云信息技术有限公司 Redis high-availability VIP (very important person) drifting method, terminal and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112910694A (en) * 2021-01-22 2021-06-04 苏州浪潮智能科技有限公司 Method, system and medium for transmitting filing log
CN112910694B (en) * 2021-01-22 2022-11-29 苏州浪潮智能科技有限公司 Method, system and medium for transmitting filing log

Also Published As

Publication number Publication date
CN111444062B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US20100115070A1 (en) Method for generating manipulation requests of an initialization and administration database of server cluster, data medium and corresponding a server cluster, data medium and corresponding service cluster
CN101118521B (en) System and method for spanning multiple logical sectorization to distributing virtual input-output operation
EP2923272B1 (en) Distributed caching cluster management
CN109379448B (en) File distributed deployment method and device, electronic equipment and storage medium
KR101663215B1 (en) Data storage method and device
WO2016160634A1 (en) Data striping across storage nodes that are assigned to multiple logical arrays
CN113504954B (en) Method, system and medium for calling CSI LVM plug in and dynamic persistent volume supply
CN109886693B (en) Consensus realization method, device, equipment and medium for block chain system
CN105052111A (en) Service migration across cluster boundaries
CN104239227A (en) Virtualization storage management device and local virtualization storage management device and method
CN105450759A (en) System mirror image management method and device
CN108089912A (en) A kind of virtual machine surpasses emerging system construction method and device with container
US11693686B2 (en) Enhanced management of storage repository availability in a virtual environment
CN108881512A (en) Virtual IP address equilibrium assignment method, apparatus, equipment and the medium of CTDB
US9229762B2 (en) Host providing system and host providing method
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
CN108073423A (en) A kind of accelerator loading method, system and accelerator loading device
CN105095103A (en) Storage device management method and device used for cloud environment
CN112579008A (en) Storage deployment method, device, equipment and storage medium of container arrangement engine
CN103369038A (en) PaaS (platform as a service) management platform and method
CN112087516A (en) Storage upgrading method and device based on Docker virtualization technology
US20200387404A1 (en) Deployment of virtual node clusters in a multi-tenant environment
CN111444062A (en) Method and device for managing master node and slave node of cloud database
CN113127430B (en) Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment
CN111866210A (en) Virtual IP balance distribution method, system, terminal 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
GR01 Patent grant
GR01 Patent grant