CN111444062B - 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
CN111444062B
CN111444062B CN202010250427.2A CN202010250427A CN111444062B CN 111444062 B CN111444062 B CN 111444062B CN 202010250427 A CN202010250427 A CN 202010250427A CN 111444062 B CN111444062 B CN 111444062B
Authority
CN
China
Prior art keywords
address
node
master node
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.)
Active
Application number
CN202010250427.2A
Other languages
Chinese (zh)
Other versions
CN111444062A (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

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: distributing a first address in a management network and a second address in a service network for 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 to the slave node; monitoring the master node through the management network according to the first address; according to the third address, monitoring the slave node through the management network; when the master node and the slave node perform data synchronization, the master node and the slave node are controlled to perform data synchronization according to the second address and the fourth address. The scheme can synchronize data without increasing the load of the management network.

Description

Method and device for managing master node and slave node of cloud database
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for managing a master node and a slave node of a cloud database.
Background
With the recent rise of cloud computing concepts, databases are gradually migrated to cloud computing platforms to become 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 various flexible data models, and is widely used in various Internet projects.
At present, when switching between a master node and a slave node in a Redis system, the node state can be monitored at a user side through a service network, data synchronization can be realized by utilizing the service network, and the node state can also be monitored at a service side through a management network, so that the data synchronization can be realized through the management network.
As can be seen from the above description, when the Redis system performs the master-slave node switching, the service side cannot perform unified management when monitoring the node state through the service network, and the service side monitors the node running state through the management network, which causes a larger management network load when performing data synchronization due to a low management network bandwidth.
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:
a first address in a management network and a second address in a service network are distributed 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 to a slave node;
monitoring the master 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 perform data synchronization, controlling the master node and the slave node to perform data synchronization according to the second address and the fourth address.
Preferably, the method comprises the steps of,
the monitoring, by the management network, the master node according to the first address includes:
accessing the first address, and acquiring the operation information of the master node from the first address;
and monitoring 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.
Preferably, the method comprises the steps of,
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 method comprises the steps of,
after the monitoring of the slave node by 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 master node and the slave node is required, unbinding the master node from a virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master 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 system comprises a distribution module, a cloud database and a service network, wherein the distribution module is used for distributing a first address in a management network and a second address in the service network for a main node, the management network is a network used by a service end, the service network is a network used by a user end, and the user end 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 to a slave node;
the monitoring module is used for monitoring the master 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 master node and the slave node to perform data synchronization according to the second address and the fourth address when the master node and the slave node perform data synchronization.
Preferably, the method comprises the steps of,
the monitoring module is used for accessing the first address and acquiring the operation information of the master 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 method comprises the steps of,
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 method comprises the steps of,
further comprises:
the processing module is used for determining whether node switching between the master node and the slave node is needed; when the switching between the master node and the slave node is required, unbinding the master node from a virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master 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 for storing 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, and each user is required to be monitored independently, and unified monitoring management cannot be performed, and when the server side monitors the master node and the slave node through a management network, data synchronization is required to be performed through the management network, however, the bandwidth of the management network is low, which causes excessive load of the management network, so that the master node and the slave node can be monitored through the management network to realize unified management of the management network, and when the data synchronization is required, the master node and the slave node are controlled to perform data synchronization through the service network. Based on the above, a first address in the management network and a second address in the service network can be allocated to the master node, a third address in the management network and a fourth address in the service network can be allocated to the slave node, the master node is monitored through the management network according to the first address, 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, the 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 that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for managing master and slave nodes of a cloud database according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for managing master and slave nodes of a cloud database according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus for managing master and slave nodes of a cloud database according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another apparatus for managing a master node and a slave node of a cloud database according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by those skilled in the art without making any inventive effort based on the embodiments of the present invention are within the scope of protection 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, which may include the steps of:
step 101: distributing a first address in a management network and a second address in a service network for 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;
step 102: allocating a third address in the management network and a fourth address in the service network to the slave node;
step 103: monitoring the master node through the management network according to the first address;
step 104: according to the third address, monitoring the slave node through the management network;
step 105: when the master node and the slave node perform data synchronization, the master node and the slave node are controlled to perform data synchronization according to the second address and the fourth address.
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 the related conditions, and monitors each user independently, and cannot uniformly monitor and manage, and when the server side monitors the master node and the slave node through the management network, the data synchronization is required to be performed through the management network, however, the bandwidth of the management network is low, which causes excessive load of the management network, so that the master node and the slave node can be monitored through the management network, the unified management of the management network is realized, and when the data synchronization is required, the data synchronization is performed through the service network by controlling the master node and the slave node. Based on the above, a first address in the management network and a second address in the service network can be allocated to the master node, a third address in the management network and a fourth address in the service network can be allocated to the slave node, the master node is monitored through the management network according to the first address, 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, the data synchronization can be realized through the service network without increasing the load of the management network.
In order to implement monitoring of the master node and the slave node through the management network, step 103 in the above embodiment monitors the master node through the management network according to the first address, including: accessing a first address, and acquiring operation information of a main node from the first address;
step 104 in the above embodiment monitors, according to the third address, the slave node through the management network, 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 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 may access the first address (e.g., an IP address) to obtain operation information of the master node, and access the third address to obtain operation information of the slave node, thereby implementing unified monitoring of the master node and the slave node through the management network.
In order to achieve data synchronization between the master node and the slave node, step 105 in the above embodiment controls the master node and the slave node to perform data synchronization according to the second address and the fourth address, which may be specifically achieved by:
and the control master node synchronizes the data to be synchronized to the fourth address through the second address.
In an embodiment of the invention, the slave node can be used as a standby node and needs to perform data synchronization with the master node, so that the situation that the master node acquires data when the state of the master node is abnormal can be avoided, and the data loss is avoided. Based on this, the master node and the slave node can be controlled to perform data synchronization according to the second address and the fourth address based on the second address and the fourth address allocated to the master node and the slave node.
In order to implement master-slave switching, the foregoing embodiment further includes, after monitoring the slave node through the management network according to the third address:
determining whether node switching between a master node and a slave node is required;
when the switching between the master node and the slave node is needed, unbinding the master node and the virtual IP address VIP, and realizing the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master node through the VIP.
In an embodiment of the present invention, since the management network monitors the operation information of the master node and the slave node through the first address and the third address in real time, the master node needs to be accessed through the virtual IP address VIP based on the service data, and when it is determined that the node switching between the master node and the slave node needs to be performed (for example, the master node is down), the slave node can be bound with the VIP, and the master node and the VIP are unbound, thereby implementing the node switching between the master node and the slave node, and ensuring the normal operation of the system.
The invention can perform the master-slave switching of the cross-network, such as a redis system, and uniformly deploy the monitor on the server side, thereby being convenient for 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 container class, 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 nodes of the master node and the slave node are switched, the monitor can set the master node service network IP for the slave node, so that the service network with high bandwidth can be walked for data synchronization; at the server side, the monitor can monitor the running condition of each node directly 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 detailed description of a method for managing a master node and a slave node of a cloud database is provided in the embodiments of the present invention, which may specifically include the following steps:
step 201: and distributing a first address in a management network and a second address in a service network for the master node, wherein the management network is a network used by a server, the service network is a network used by a user terminal, and the user terminal 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 traffic network.
Step 203: the first address is accessed, and the operation information of the master node is obtained 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 a Redis system, a party where a tenant purchases a Redis product service is a user end, and a network where the tenant purchases the Redis product service is a VPC (Virtual Private Cloud, virtual private network) service network. The party renting the Redis product service is a service end, and the network used by the party renting the Redis product service is a management network.
For example, a management network IP may be added to the master node and the slave node, and mapped with the service network IP, and a monitor may be uniformly deployed at the server side, so as to achieve a monitoring effect 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 is required.
Step 206: when the switching between the master node and the slave node is needed, unbinding the master node from the virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master node through the VIP.
Specifically, map container class can be used to realize the mutual mapping of management network IP and service network IP, wherein management network IP is used as Key, service network IP is used as Value, so that service network IP can be found through management network IP, and when master-slave switching occurs, monitor can set master node service network IP for slave node, and ensure that data synchronization can walk service network with bandwidth height. When the master-slave switching occurs, because the management network IP of each node is associated with the service network IP, map container types are used, the service network IP is found through the management network IP, the service network IP is utilized for data synchronization among the nodes, the slave nodes are set to be the master node service network IP during the master-slave switching, and meanwhile, the monitor can monitor the running condition of the nodes through the management network IP at the server side.
For example, when the monitor detects that the master node is down, the monitor unbinds the master node to the VIP and binds the node to the VIP.
Step 207: when the master node and the slave node perform data synchronization, the master node is controlled to synchronize the data to be synchronized to a fourth address through the second address.
As shown in fig. 3, an embodiment of the present invention provides an apparatus for managing a master node and a slave node of a cloud database, including:
the allocation module 301 is configured to allocate a first address in a management network and a second address in a service network to a 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 to the slave node;
the monitoring module 302 is configured to monitor the master node through the management network according to the first address allocated by the allocation module 301; monitoring the slave node through the management network according to the third address distributed by the distribution module;
the data synchronization module 303 is 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 the related conditions, and monitors each user independently, and cannot uniformly monitor and manage, and when the server side monitors the master node and the slave node through the management network, the data synchronization is required to be performed through the management network, however, the bandwidth of the management network is low, which causes excessive load of the management network, so that the master node and the slave node can be monitored through the management network, the unified management of the management network is realized, and when the data synchronization is required, the data synchronization module is used for controlling the master node and the slave node to perform the data synchronization through the service network. Based on the above, the first address in the management network and the second address in the service network can be allocated to the master node by the allocation module, the third address in the management network and the fourth address in the service network can be allocated to the slave node by the monitoring module, the master node is monitored by the management network according to the first address, the slave node is monitored by 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, the 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 the master 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 device for managing the master node and the slave node of the cloud database shown in fig. 3, as shown in fig. 4, in an embodiment of the present invention, the device further includes:
a processing module 304, configured to determine whether a node handover between a master node and a slave node is required; when the switching between the master node and the slave node is needed, unbinding the master node from the virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master node through the VIP.
It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the database system management apparatus. In other embodiments of the invention, the database system management device may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The content of information interaction and execution process between the units in the device is based on the same conception as the embodiment of the method of the present invention, and specific content can be referred to the description in the embodiment of the method of the present invention, which is not repeated here.
The embodiment of the invention also provides a device for managing the master node and the slave node of the cloud database, which comprises: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor is configured to invoke the machine-readable program to perform the database system management method according to any of the embodiments of the present invention.
Embodiments of the present invention also provide a computer readable medium having stored thereon computer instructions that, when executed by a processor, cause the processor to perform the database system management method of any of the embodiments of the present invention. Specifically, a system or apparatus provided with a storage medium on which a software program code realizing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or apparatus may be caused to read out and execute the program code stored in the storage medium.
In this case, the program code itself read from the storage medium may realize the functions of any of the above-described embodiments, and thus the program code and the storage medium storing the program code form part of the present invention.
Examples of the storage medium for providing 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 by a communication network.
Further, it should be apparent that the functions of any 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 part or all of the actual operations based on the instructions of the program code.
Further, it is understood that the program code read out by the storage medium is written into a memory provided in an expansion board inserted into a computer or into a memory provided in an expansion unit connected to the computer, and then a CPU or the like mounted on the expansion board or the expansion unit is caused to perform part and all of actual operations based on instructions of the program code, thereby realizing the functions of any of the above embodiments.
The embodiments of the invention have at least the following beneficial effects:
1. 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 the related conditions, and monitors each user independently, and cannot uniformly monitor and manage, and when the server side monitors the master node and the slave node through the management network, the data synchronization is required to be performed through the management network, however, the bandwidth of the management network is low, which causes excessive load of the management network, so that the master node and the slave node can be monitored through the management network, the unified management of the management network is realized, and when the data synchronization is required, the data synchronization is performed through the service network by controlling the master node and the slave node. Based on the above, a first address in the management network and a second address in the service network can be allocated to the master node, a third address in the management network and a fourth address in the service network can be allocated to the slave node, the master node is monitored through the management network according to the first address, 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, the 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 may access the first address (e.g., IP address) to obtain operation information of the master node, and access the third address to obtain operation information of the slave node, thereby implementing unified monitoring of the master node and the slave node through the management network;
3. in an embodiment of the invention, the slave node can be used as a standby node and needs to perform data synchronization with the master node, so that the situation that the master node acquires data when the state of the master node is abnormal can be avoided, and the data loss is avoided. Based on this, the master node and the slave node can be controlled to perform data synchronization according to the second address and the fourth address based on the second address and the fourth address allocated to the master node and the slave node.
It should be noted that not all the steps and modules in the above flowcharts and the system configuration diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution sequence 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 multiple physical entities, or may be implemented jointly by some components in multiple independent devices.
In the above embodiments, the hardware unit may be mechanically or electrically implemented. For example, a hardware unit may include permanently dedicated circuitry or logic (e.g., a dedicated processor, FPGA, or ASIC) to perform the corresponding operations. The hardware unit may also include programmable logic or circuitry (e.g., a general-purpose processor or other programmable processor) that may be temporarily configured by software to perform the corresponding operations. The particular implementation (mechanical, or dedicated permanent, or temporarily set) may be determined based on cost and time considerations.
While the invention has been illustrated and described in detail in the drawings and in the preferred embodiments, the invention is not limited to the disclosed embodiments, and it will be appreciated by those skilled in the art that the code audits of the various embodiments described above may be combined to produce further embodiments of the invention, which are also within the scope of the invention.

Claims (4)

1. The method for managing the master node and the slave node of the cloud database is characterized by being applied to a server and comprising the following steps:
a first address in a management network and a second address in a service network are distributed 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 to a slave node;
monitoring the master node through the management network according to the first address;
monitoring the slave node through the management network according to the third address;
when the master node and the slave node perform data synchronization, the master node and the slave node are controlled to perform data synchronization according to the second address and the fourth address;
the monitoring, by the management network, the master node according to the first address includes:
accessing the first address, and acquiring the operation information of the master node from the first address;
and monitoring the slave node through the management network according to the third address, including:
accessing the third address, and acquiring the operation information of the slave node from the third address;
the controlling the master node and the slave node to perform data synchronization according to the second address and the fourth address includes:
controlling the master node to synchronize data to be synchronized to the fourth address through the second address;
after the monitoring of the slave node by 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 master node and the slave node is required, unbinding the master node from a virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master node through the VIP.
2. An apparatus for managing a master node and a slave node of a cloud database, comprising:
the system comprises a distribution module, a cloud database and a service network, wherein the distribution module is used for distributing a first address in a management network and a second address in the service network for a main node, the management network is a network used by a service end, the service network is a network used by a user end, and the user end 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 to a slave node;
the monitoring module is used for monitoring the master 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;
the data synchronization module is used for controlling the master node and the slave node to perform data synchronization according to the second address and the fourth address when the master node and the slave node perform data synchronization;
the monitoring module is used for accessing the first address and acquiring the operation information of the master node from the first address; accessing the third address, and acquiring the operation information of the slave node from the third address;
the data synchronization module is used for controlling the master node to synchronize data to be synchronized to the fourth address through the second address;
further comprises:
the processing module is used for determining whether node switching between the master node and the slave node is needed; when the switching between the master node and the slave node is required, unbinding the master node from a virtual IP address VIP, and binding the slave node from the VIP to realize the switching between the master node and the slave node; the node bound with the VIP is a master node, and the user side accesses the master node through the VIP.
3. An apparatus for managing a master node and a slave node of a cloud database, comprising: at least one memory and at least one processor;
the at least one memory for storing a machine readable program;
the at least one processor configured to invoke the machine readable program to perform the method of claim 1.
4. A computer readable medium having stored thereon computer instructions which, when executed by a processor, cause the processor to perform the method of claim 1.
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 CN111444062A (en) 2020-07-24
CN111444062B true 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)

Families Citing this family (1)

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

Citations (14)

* 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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9811432B2 (en) * 2013-03-04 2017-11-07 Netapp, Inc. Systems and methods for resynchronizing mirroring partners in a storage system
US9128902B2 (en) * 2013-04-25 2015-09-08 Netapp, Inc. Systems and methods for managing disaster recovery in a storage system
CN104679907A (en) * 2015-03-24 2015-06-03 新余兴邦信息产业有限公司 Realization method and system for high-availability and high-performance database cluster

Patent Citations (14)

* 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
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

Also Published As

Publication number Publication date
CN111444062A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN106534328B (en) Node connection method and distributed computing system
WO2016184045A1 (en) Method and apparatus for network service capacity expansion
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
CN113504954B (en) Method, system and medium for calling CSI LVM plug in and dynamic persistent volume supply
CN106789168B (en) Deployment method of data center server management network and rack top type switch
KR101663215B1 (en) Data storage method and device
CN109981493B (en) Method and device for configuring virtual machine network
US11082505B2 (en) Dynamic discovery of available storage servers
CN110661647A (en) Life cycle management method and device
CN113783765B (en) Method, system, equipment and medium for realizing intercommunication between cloud internal network and cloud external network
CN104239227A (en) Virtualization storage management device and local virtualization storage management device and method
CN108089912A (en) A kind of virtual machine surpasses emerging system construction method and device with container
CN109845192B (en) Computer system and method for dynamically adapting a network and computer readable medium
CN110569302A (en) method and device for physical isolation of distributed cluster based on lucene
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
CN104506654A (en) Cloud computing system and backup method of dynamic host configuration protocol server
CN112202843B (en) High-availability system and super-fusion system of control node
CN111444062B (en) Method and device for managing master node and slave node of cloud database
CN106227470B (en) A kind of storage resource management method and device
US11979335B2 (en) Network controller
CN116800616B (en) Management method and related device of virtualized network equipment
CN110795209B (en) Control method and device
CN111866210A (en) Virtual IP balance distribution method, system, terminal and storage medium
CN104052799B (en) A kind of method that High Availabitity storage is realized using resource ring
CN114879907A (en) Data distribution determination method, 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
GR01 Patent grant
GR01 Patent grant