WO2017101642A1 - Method and apparatus for upgrading data node of distributed system - Google Patents

Method and apparatus for upgrading data node of distributed system Download PDF

Info

Publication number
WO2017101642A1
WO2017101642A1 PCT/CN2016/106804 CN2016106804W WO2017101642A1 WO 2017101642 A1 WO2017101642 A1 WO 2017101642A1 CN 2016106804 W CN2016106804 W CN 2016106804W WO 2017101642 A1 WO2017101642 A1 WO 2017101642A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
data node
node
copy
primary
Prior art date
Application number
PCT/CN2016/106804
Other languages
French (fr)
Chinese (zh)
Inventor
许瑞亮
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2017101642A1 publication Critical patent/WO2017101642A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present invention relates to the field of computer network technologies, and in particular, to a data node upgrade method and apparatus for a distributed system.
  • Distributed storage is the decentralized storage of data on multiple independent devices.
  • a distributed system is a cluster system with many data nodes, and each data node can be understood as a data storage server. When doing data storage, storing several pieces of data into corresponding data nodes is the core concept of a distributed system.
  • the generally adopted method is to shut down the data node and stop the external service service of the data node, that is, the data node is offline, offline.
  • the data node is upgraded.
  • the data node is started, that is, the data node is brought online, so that the upgraded data node provides the external service service.
  • the data node of the distributed system generally has a backup. Different master copy data, the data node needs to be restarted after the upgrade, and the master copy data of the data node is re-decisive.
  • the decision process takes a long time, and the start and stop of the data node causes the service service delay or error of the data node. Etc., thus affecting the business services of distributed systems.
  • the present invention has been made in order to provide a data node upgrade method for a distributed system that overcomes the above problems or at least partially solves the above problems, and a data node upgrade device for a corresponding distributed system.
  • a data node upgrade method for a distributed system for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and multiple From copy data, methods include:
  • a data node upgrading apparatus for a distributed system for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and From the copy data, the device includes:
  • a selection module configured to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes
  • a transfer module configured to transfer a service load of the first data node to the at least one second data node, where the second data node backs up the slave copy data corresponding to the primary copy data in the first data node;
  • the upgrade module is configured to perform offline processing on the first data node to complete the upgrade of the first data node offline.
  • a computer program comprising computer readable code that, when run on a computing device, causes the computing device to perform the data node upgrade method of the distributed system described above.
  • a computer readable medium storing the above computer program is provided.
  • the upgrade instruction is received, and the first data node to be upgraded is selected from the plurality of data nodes; the traffic load of the first data node is transferred to the at least one second data node, and the second data node backup has a corresponding The slave data of the primary replica data in the first data node; performing offline processing on the first data node to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding the data node The impact of shutting down and starting business services on distributed systems.
  • FIG. 1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a data node upgrade method of a distributed system according to another embodiment of the present invention.
  • FIG. 3 is a functional block diagram of a data node upgrading apparatus of a distributed system in accordance with one embodiment of the present invention
  • FIG. 4 is a functional block diagram of a data node upgrading apparatus of a distributed system according to another embodiment of the present invention.
  • FIG. 5 is a block diagram schematically showing a computing device for performing a data node upgrade method of a distributed system according to an embodiment of the present invention
  • Fig. 6 schematically shows a storage unit for holding or carrying program code implementing a data node upgrade method of a distributed system according to an embodiment of the present invention.
  • a plurality of data nodes are used to back up the primary copy data and the plurality of secondary copy data of the data, that is, the primary copy data of the data is more
  • the copy data is stored separately on a plurality of different data nodes.
  • both the primary replica data and the secondary replica data may be stored on each data node of the distributed system.
  • the service service is provided by the primary replica data of the data node.
  • FIG. 1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
  • Step S100 Receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
  • a data node to be upgraded after receiving the upgrade instruction, starting to upgrade the data node of the distributed system, in order to implement a smooth upgrade of the distributed system, selecting a data node to be upgraded from multiple data nodes of the distributed system, specifically,
  • the data node to be upgraded may be randomly selected from a plurality of data nodes, or the data node to be upgraded may be selected according to the load condition of the plurality of data nodes, as the first data node to be upgraded, where the first to be upgraded is selected.
  • a data node selection is not specifically limited.
  • Step S101 Transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
  • the traffic load of the first data node is transferred to the at least one second data node, where the service access service is provided by the at least one second data node instead of the first data node, and the primary data node is The business access of the replica data is transferred to the slave replica data of at least one second data node.
  • the first data node may store the primary replica data of different data. Therefore, when performing the traffic load transfer, the service access provided by all the primary replica data stored by the first data node needs to be transferred to the primary. Copy data from the copy data.
  • a data node from which to select at least one second data node that is responsible for the traffic load of the first data node For example, for one piece of data, three data nodes can be used to back up the primary copy data and the two secondary copy data of the data. If the first data node backs up the primary copy data of three copies of the data, the three data are The backup data is backed up at least on two data nodes. When performing business load transfer, it is generally transferred to a slave copy data, so it needs to be from at least two. Among the data nodes, a data node that assumes the traffic load of the first data node is selected as at least one second data node.
  • the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
  • Step S102 Perform offline processing on the first data node to complete the upgrade of the first data node offline.
  • the first data node After transferring the traffic load of the first data node to the at least one second data node by using step S101, the first data node only backs up the slave replica data with the data.
  • the service service is generally provided by the master replica data. That is to say, the first data node is disconnected from the service of the distributed system, and the first data node can be offlined, the first data node is taken offline, and the first data node is upgraded offline.
  • receiving an upgrade instruction selecting a first data node to be upgraded from a plurality of data nodes, and transferring a service load of the first data node to at least one second data node, the second data node
  • the backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
  • FIG. 2 is a flow chart showing a data node upgrade method of a distributed system according to another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • Step S200 Receive an upgrade instruction, analyze a service load of a data node of the distributed system, and select a data node with a minimum service load pressure as the first data node to be upgraded.
  • the traffic load refers to the amount of access to the primary replica data of the data node.
  • the service services provided by each data node are not the same. Some data nodes have high traffic load pressure, and some data nodes have low traffic load pressure.
  • the data of the distributed system is received.
  • the service load of the node is analyzed, and the data node with the lowest traffic load pressure is selected as the first data node to be upgraded.
  • the present invention is to upgrade all the data nodes of the distributed system. Therefore, the first data node to be upgraded is the data node with the least traffic load pressure among the un-upgraded data nodes, and the data node with the lowest traffic load pressure can be avoided.
  • Step S201 Search, according to the primary replica data identifier of the first data node, a data node that backs up the secondary replica data corresponding to the primary replica data in the first data node in the data node of the distributed system.
  • a piece of data is used by multiple data nodes to back up the primary copy data and the plurality of secondary copy data of the data, and the same identification is set for the primary copy data and the copy data, so as to facilitate According to the identifier, the primary copy data or the secondary data is searched, and different identifiers are set for different data, so that the primary copy data of the data or the copy data can be accurately found, which saves the search time and improves the upgrade efficiency.
  • the service service of the primary data of the first data node needs to be transferred to the secondary data of the other data node.
  • the primary copy of the first data node is not The business service of the data is transferred to the slave copy data of any data node, but to the data node backed up with the slave copy data corresponding to the master copy data in the first data node.
  • the first data node may back up the data with different data.
  • the primary replica data if the first data node is to be upgraded, needs to transfer the business services of all the primary replica data in the first data node to the secondary replica data of the other data nodes. Therefore, it is necessary to look up, in the data node of the distributed system, the data node backed up with the replica data corresponding to all the primary replica data in the first data node according to the primary replica data identifier of the first data node.
  • Step S202 analyzing a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and selecting at least one second data node according to the load balancing policy.
  • the data node that backs up the slave copy data corresponding to the master copy data in the first data node is found by using step S201, however, the traffic load of the first data node is not transferred to all the found data nodes, for example, for one
  • the data has one data node backed up with the master copy data and two data node backups with the slave copy data. When the business load of the data of the first data node is transferred, only the backup data can be transferred to the backup. One of the data nodes.
  • the traffic load pressure of the data node is analyzed, and the traffic load policy is selected according to the load balancing policy.
  • the load refers to the load balancing of the traffic load of the data nodes of the distributed system, without the pressure of the traffic load of some data nodes is large, and the traffic load pressure of some data nodes is very small, here not only consider that the backup has corresponding to
  • the traffic load of the data node of the replica data from the primary replica data in the first data node also takes into account the traffic load of the data node after the traffic load is transferred.
  • the at least one second data node selected in this step is a data node with a small traffic load pressure.
  • selecting at least one second data node according to the load balancing policy can overcome the defect that the traffic load of the data node with high traffic load pressure is caused by the arbitrary transfer of the traffic load.
  • the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
  • Step S203 converting the copy data of the at least one second data node into the main copy data, and converting the corresponding main copy data of the first data node into the slave copy data.
  • the traffic load of the first data node needs to be transferred to the at least one second data node.
  • the service load is generally provided by the primary replica data
  • at least one The second data node is a data node that backs up the replica data corresponding to the primary replica data of the first data node, and therefore, the replica data of the at least one second data node needs to be converted into the primary replica data
  • the first data node is The corresponding primary copy data is converted into secondary replica data, thereby transferring the traffic load to the at least one second data node.
  • Step S204 Perform offline processing on the first data node to complete the upgrade of the first data node offline.
  • the first data node After the service load of the first data node is transferred to the at least one second data node by using step S203, the first data node will no longer provide the service service. At this time, the first data node can be offline, and the first line is offline. The data node is upgraded.
  • the method further includes:
  • Step S205 relocating the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
  • the access request from the replica data in the first data node is relocated to the primary replica data corresponding to the replica data in the other data node.
  • the copy data is used to provide a service service from the primary data corresponding to the copy data from the other data nodes after the positioning, wherein the first data node may be the first data node before the copy data may be the traffic load transfer.
  • the backup copy data can also be obtained from the copy data after the business load is transferred.
  • Step S206 after the first data node completes the upgrade, performing online processing on the upgraded first data node.
  • the first data node After the upgrade of the first data node is completed online, the first data node needs to be brought online, so that the first data node continues to provide service services.
  • the service load of the at least one third data node needs to be transferred to the upgraded first data node, so that the upgraded first data node is restored to provide service services, where after the upgrade
  • the first data node backup has slave data corresponding to the primary copy data in the third data node.
  • the traffic load of the at least one third data node is transferred to the first data node, where the first data node replaces the at least one third data node to provide a service service, and the at least one third data node is the master.
  • the business service of the replica data is transferred to the slave replica data of the first data node.
  • Step S207 Searching, in the data node of the distributed system, the data node backed up with the primary replica data corresponding to the replica data in the first data node after the upgrade according to the upgraded data identifier of the first data node.
  • the traffic load of other data nodes needs to be transferred to the first data node, and the first data node can provide the service service.
  • the backup data may be searched for in the data node of the distributed system according to the secondary data identifier of the first data node.
  • Step S208 analyzing a service load of the data node corresponding to the primary replica data corresponding to the replica data in the upgraded first data node, and selecting from the load balancing policy according to the load balancing policy One less third data node.
  • step S207 After searching for the data nodes corresponding to the primary replica data of the replica data in the upgraded first data node according to step S207, analyzing the traffic load of the data nodes, determining the traffic load of the data nodes, according to the load.
  • the equalization strategy selects a data node with a large traffic load as the third data node, thereby reducing the traffic load of the third data node, and balancing the traffic load of the distributed system.
  • Step S209 Convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
  • the traffic load of the at least one third data node needs to be transferred to the first data node.
  • the service load is generally provided by the primary replica data
  • at least one The third data node is a data node backed up with the primary copy data corresponding to the copy data in the first data node, and therefore, the primary copy data of the at least one third data node needs to be converted into the secondary copy data, and the upgraded
  • the correspondence of a data node is converted from the replica data to the primary replica data, thereby transferring the traffic load to the first data node, so that the upgraded data node is restored to provide the service service.
  • the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided.
  • the service service is affected.
  • the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found.
  • the primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy.
  • Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed.
  • the system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out.
  • the first data node is processed online.
  • the backup of the data node of the distributed system has a corresponding correspondence.
  • the data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one A third data node, thereby reducing the traffic load of the third data node, and achieving a smooth upgrade of the distributed system.
  • FIG. 3 shows a functional block diagram of a data node upgrade device of a distributed system in accordance with one embodiment of the present invention. As shown in FIG. 3, the device includes: a selection module 300, a transfer module 310, and an upgrade module 320.
  • the selecting module 300 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
  • the transferring module 310 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
  • the upgrade module 320 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
  • the device receives an upgrade instruction, selects a first data node to be upgraded from a plurality of data nodes, and transfers a service load of the first data node to at least one second data node, the second data node
  • the backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
  • the device includes: a selection module 400, a transfer module 410, and an upgrade module 420.
  • the selecting module 400 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
  • the transfer module 410 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
  • the upgrade module 420 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
  • the device further includes: a processing module 430, configured to: after the first data node completes the upgrade, Performing online processing on the upgraded first data node;
  • the transfer module 410 is further adapted to: transfer the traffic load of the at least one third data node to the upgraded first data node, so that the upgraded first data node resumes providing the service service, wherein the upgraded first data node
  • the backup has secondary copy data corresponding to the primary copy data in the third data node.
  • the transferring module 410 is further adapted to: convert the copied data of the at least one second data node into the primary copy data, and convert the corresponding primary copy data of the first data node into the secondary copy data.
  • the device further includes: a searching module 440 and an analyzing module 450.
  • the searching module 440 is adapted to search, in the data node of the distributed system, the data node that is backed up with the secondary copy data corresponding to the primary copy data in the first data node according to the primary copy data identifier of the first data node.
  • the analyzing module 450 is adapted to analyze a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and select at least one second data node from the load balancing policy.
  • the transferring module 410 is further adapted to: convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
  • the searching module 440 is further adapted to: according to the upgraded data identifier of the upgraded first data node, searching for a backup in the data node of the distributed system and corresponding to the copy data from the first data node after the upgrade Data node of the primary replica data;
  • the analyzing module 450 is further configured to: analyze a service load that is backed up with a data node corresponding to the primary replica data of the replica data in the upgraded first data node, and select at least one third data node from the load balancing policy according to the load balancing policy .
  • the selecting module 400 is further adapted to: analyze the traffic load of the data node of the distributed system, and select the data node with the smallest traffic load as the first data node to be upgraded.
  • the apparatus further includes: a positioning module 460, configured to relocate the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
  • a positioning module 460 configured to relocate the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
  • the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided.
  • the service service is affected.
  • the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found.
  • the primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy.
  • Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed.
  • the system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out.
  • the first data node is processed online.
  • the backup of the data node of the distributed system has a corresponding correspondence.
  • the data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one third data node is eliminated, thereby reducing the traffic load of the third data node, and implementing a smooth upgrade of the distributed system.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • DSP digital signal processor
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals.
  • signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 5 illustrates a computing device that can implement a method of acquiring application information in accordance with the present invention.
  • the computing device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a storage device 520.
  • Storage device 520 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • Save Storage device 520 has a storage space 530 that stores program code 531 for performing any of the method steps described above.
  • storage space 530 storing program code may include various program code 531 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card, or a floppy disk.
  • a computer program product is typically a portable or fixed storage unit such as that shown in FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to storage device 520 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit comprises computer readable code 531 ' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 510, which when executed by the computing device causes the computing device Perform the various steps in the method described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a method and apparatus for upgrading a data node of a distributed system. In a distributed system, with regard to one piece of data, a plurality of data nodes are respectively used for backing up primary copy data and multiple secondary copy data of this piece of data. The method comprises: receiving an upgrade instruction, and selecting, from a plurality of data nodes, a first data node to be upgraded; transferring a service load of the first data node to at least one second data node, and the second data node backing up secondary copy data corresponding to primary copy data in the first data node; and performing offline processing on the first data node, so as to complete the upgrade of the first data node offline.

Description

分布式系统的数据节点升级方法及装置Data node upgrade method and device for distributed system
相关申请的交叉参考Cross-reference to related applications
本申请主张在2015年12月17日在中国提交的中国专利申请号No.201510954639.8的优先权,其全部内容通过引用包含于此。The present application claims priority to Chinese Patent Application No. 201510954639.8, filed on Jan. 17, 2015, the entire content of
技术领域Technical field
本发明涉及计算机网络技术领域,具体涉及一种分布式系统的数据节点升级方法及装置。The present invention relates to the field of computer network technologies, and in particular, to a data node upgrade method and apparatus for a distributed system.
背景技术Background technique
分布式存储就是将数据分散存储在多台独立的设备上。分布式系统为具有很多数据节点的集群系统,每个数据节点可以理解为一个数据存储服务器。在做数据存储时,将若干条数据存储到对应的数据节点中,这是分布式系统核心的概念。Distributed storage is the decentralized storage of data on multiple independent devices. A distributed system is a cluster system with many data nodes, and each data node can be understood as a data storage server. When doing data storage, storing several pieces of data into corresponding data nodes is the core concept of a distributed system.
在现有技术中,当需要对分布式系统的数据节点进行升级时,一般采用的方法是将数据节点关停,停止该数据节点对外的业务服务,也就是说将数据节点下线,在线下对数据节点进行升级,在数据节点升级完成后,再说将数据节点启动,也就是将数据节点上线,使升级后的数据节点对外提供业务服务,然而,在分布式系统的数据节点上一般备份有不同的主副本数据,数据节点在升级后需要重新启动,重新决策数据节点的主副本数据,该决策过程需要耗费很长时间,而且数据节点的启停,导致数据节点的业务服务延时或错误等,从而对分布式系统的业务服务造成影响。In the prior art, when the data node of the distributed system needs to be upgraded, the generally adopted method is to shut down the data node and stop the external service service of the data node, that is, the data node is offline, offline. The data node is upgraded. After the data node is upgraded, the data node is started, that is, the data node is brought online, so that the upgraded data node provides the external service service. However, the data node of the distributed system generally has a backup. Different master copy data, the data node needs to be restarted after the upgrade, and the master copy data of the data node is re-decisive. The decision process takes a long time, and the start and stop of the data node causes the service service delay or error of the data node. Etc., thus affecting the business services of distributed systems.
发明内容Summary of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的分布式系统的数据节点升级方法和相应的分布式系统的数据节点升级装置。 In view of the above problems, the present invention has been made in order to provide a data node upgrade method for a distributed system that overcomes the above problems or at least partially solves the above problems, and a data node upgrade device for a corresponding distributed system.
根据本发明的一个方面,提供了一种分布式系统的数据节点升级方法,在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,方法包括:According to an aspect of the present invention, a data node upgrade method for a distributed system is provided. In a distributed system, for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and multiple From copy data, methods include:
接收升级指令,从多个数据节点中选择待升级的第一数据节点;Receiving an upgrade instruction, selecting a first data node to be upgraded from a plurality of data nodes;
将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;Transferring the traffic load of the first data node to the at least one second data node, the second data node backing up the slave replica data corresponding to the primary replica data in the first data node;
对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。Performing offline processing on the first data node to complete the upgrade of the first data node offline.
根据本发明的另一方面,提供了一种分布式系统的数据节点升级装置,在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,装置包括:According to another aspect of the present invention, a data node upgrading apparatus for a distributed system is provided. In a distributed system, for a piece of data, a plurality of data nodes are respectively used to back up the primary copy data of the data and From the copy data, the device includes:
选择模块,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点;a selection module, configured to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes;
转移模块,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;a transfer module, configured to transfer a service load of the first data node to the at least one second data node, where the second data node backs up the slave copy data corresponding to the primary copy data in the first data node;
升级模块,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。The upgrade module is configured to perform offline processing on the first data node to complete the upgrade of the first data node offline.
根据本发明的又一个方面,提供一种计算机程序,其包括计算机可读代码,当计算机可读代码在计算设备上运行时,导致计算设备执行上述的分布式系统的数据节点升级方法。According to still another aspect of the present invention, a computer program is provided comprising computer readable code that, when run on a computing device, causes the computing device to perform the data node upgrade method of the distributed system described above.
根据本发明的再一个方面,提供一种计算机可读介质,其中存储了上述计算机程序。According to still another aspect of the present invention, a computer readable medium storing the above computer program is provided.
根据本发明提供的方案,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。According to the solution provided by the present invention, the upgrade instruction is received, and the first data node to be upgraded is selected from the plurality of data nodes; the traffic load of the first data node is transferred to the at least one second data node, and the second data node backup has a corresponding The slave data of the primary replica data in the first data node; performing offline processing on the first data node to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding the data node The impact of shutting down and starting business services on distributed systems.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技 术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention, in order to understand the technology of the present invention more clearly. The above and other objects, features and advantages of the present invention will be apparent from the description of the appended claims.
附图概述BRIEF abstract
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those skilled in the art from a The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图1示出了根据本发明一个实施例的分布式系统的数据节点升级方法的流程示意图;1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention;
图2示出了根据本发明另一个实施例的分布式系统的数据节点升级方法的流程示意图;2 is a schematic flow chart of a data node upgrade method of a distributed system according to another embodiment of the present invention;
图3示出了根据本发明一个实施例的分布式系统的数据节点升级装置的功能框图;3 is a functional block diagram of a data node upgrading apparatus of a distributed system in accordance with one embodiment of the present invention;
图4示出了根据本发明另一个实施例的分布式系统的数据节点升级装置的功能框图;4 is a functional block diagram of a data node upgrading apparatus of a distributed system according to another embodiment of the present invention;
图5示意性地示出了用于执行根据本发明实施例的分布式系统的数据节点升级方法的计算设备的框图;以及FIG. 5 is a block diagram schematically showing a computing device for performing a data node upgrade method of a distributed system according to an embodiment of the present invention;
图6示意性地示出了用于保持或者携带实现根据本发明实施例的分布式系统的数据节点升级方法的程序代码的存储单元。Fig. 6 schematically shows a storage unit for holding or carrying program code implementing a data node upgrade method of a distributed system according to an embodiment of the present invention.
本发明的较佳实施方式Preferred embodiment of the invention
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood and the scope of the disclosure will be fully disclosed.
在分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,也就是说将该份数据的主副本数据和多 个从副本数据分别存储于多个不同的数据节点上。针对不同的数据,在分布式系统的每个数据节点上既可能存储有主副本数据也可能存储有从副本数据,一般情况下,由数据节点的主副本数据提供业务服务。In a distributed system, for a piece of data, a plurality of data nodes are used to back up the primary copy data and the plurality of secondary copy data of the data, that is, the primary copy data of the data is more The copy data is stored separately on a plurality of different data nodes. For different data, both the primary replica data and the secondary replica data may be stored on each data node of the distributed system. In general, the service service is provided by the primary replica data of the data node.
图1示出了根据本发明一个实施例的分布式系统的数据节点升级方法的流程示意图。如图1所示,该方法包括以下步骤:FIG. 1 is a flow chart showing a data node upgrade method of a distributed system according to an embodiment of the present invention. As shown in Figure 1, the method includes the following steps:
步骤S100,接收升级指令,从多个数据节点中选择待升级的第一数据节点。Step S100: Receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
具体地,在接收到升级指令后,开始对分布式系统的数据节点进行升级,为了实现分布式系统的平滑升级,从分布式系统的多个数据节点中选择待升级的数据节点,具体地,可以从多个数据节点中随机选择待升级的数据节点,也可以根据多个数据节点的负载情况选择要进行升级的数据节点,作为待升级的第一数据节点,这里对如何选择待升级的第一数据节点选择不做具体限定。Specifically, after receiving the upgrade instruction, starting to upgrade the data node of the distributed system, in order to implement a smooth upgrade of the distributed system, selecting a data node to be upgraded from multiple data nodes of the distributed system, specifically, The data node to be upgraded may be randomly selected from a plurality of data nodes, or the data node to be upgraded may be selected according to the load condition of the plurality of data nodes, as the first data node to be upgraded, where the first to be upgraded is selected. A data node selection is not specifically limited.
步骤S101,将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。Step S101: Transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
在本发明实施例中,将第一数据节点的业务负载转移给至少一个第二数据节点,指由至少一个第二数据节点代替第一数据节点提供业务访问服务,将对第一数据节点的主副本数据的业务访问转移给至少一个第二数据节点的从副本数据。In the embodiment of the present invention, the traffic load of the first data node is transferred to the at least one second data node, where the service access service is provided by the at least one second data node instead of the first data node, and the primary data node is The business access of the replica data is transferred to the slave replica data of at least one second data node.
在分布式系统中,第一数据节点可能存储有不同数据的主副本数据,因此,在进行业务负载转移时,需要将第一数据节点存储的所有主副本数据所提供的业务访问都转移给主副本数据的从副本数据。In a distributed system, the first data node may store the primary replica data of different data. Therefore, when performing the traffic load transfer, the service access provided by all the primary replica data stored by the first data node needs to be transferred to the primary. Copy data from the copy data.
针对一份数据,会有多个从副本数据,且多个从副本数据分别存储于不同的数据节点,因此,需要查找到备份有对应于第一数据节点的所有主副本数据的从副本数据的数据节点,从中选择承担第一数据节点的业务负载的至少一个第二数据节点。例如,针对一份数据,可以由3个数据节点用于备份该份数据的主副本数据和2个从副本数据,若第一数据节点备份有3份数据的主副本数据,则这3份数据的从副本数据至少备份于两个数据节点上,在进行业务负载转移时,一般是转移至一个从副本数据,因此,需要从至少两 个数据节点中选择承担第一数据节点的业务负载的数据节点,作为至少一个第二数据节点。For one piece of data, there will be multiple slave replica data, and multiple slave replica data are stored in different data nodes respectively. Therefore, it is necessary to find the slave replica data backed up with all the master replica data corresponding to the first data node. A data node from which to select at least one second data node that is responsible for the traffic load of the first data node. For example, for one piece of data, three data nodes can be used to back up the primary copy data and the two secondary copy data of the data. If the first data node backs up the primary copy data of three copies of the data, the three data are The backup data is backed up at least on two data nodes. When performing business load transfer, it is generally transferred to a slave copy data, so it needs to be from at least two. Among the data nodes, a data node that assumes the traffic load of the first data node is selected as at least one second data node.
这里将第一数据节点的业务负载转移给至少一个第二数据节点,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时。Here, the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
步骤S102,对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。Step S102: Perform offline processing on the first data node to complete the upgrade of the first data node offline.
在利用步骤S101将第一数据节点的业务负载转移给至少一个第二数据节点后,第一数据节点仅备份有数据的从副本数据,在上文提到了,业务服务一般是由主副本数据提供,也就说,第一数据节点与分布式系统的业务脱离,可以对第一数据节点进行下线处理,使第一数据节点下线,并在线下对第一数据节点进行升级。After transferring the traffic load of the first data node to the at least one second data node by using step S101, the first data node only backs up the slave replica data with the data. As mentioned above, the service service is generally provided by the master replica data. That is to say, the first data node is disconnected from the service of the distributed system, and the first data node can be offlined, the first data node is taken offline, and the first data node is upgraded offline.
根据本发明上述实施例提供的方法,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。According to the method provided by the foregoing embodiment of the present invention, receiving an upgrade instruction, selecting a first data node to be upgraded from a plurality of data nodes, and transferring a service load of the first data node to at least one second data node, the second data node The backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
图2示出了根据本发明另一个实施例的分布式系统的数据节点升级方法的流程示意图。如图2所示,该方法包括以下步骤:2 is a flow chart showing a data node upgrade method of a distributed system according to another embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
步骤S200,接收升级指令,对分布式系统的数据节点的业务负载进行分析,将业务负载压力最小的数据节点选择为待升级的第一数据节点。Step S200: Receive an upgrade instruction, analyze a service load of a data node of the distributed system, and select a data node with a minimum service load pressure as the first data node to be upgraded.
在本发明实施例中,业务负载指对数据节点的主副本数据的访问量。在分布式系统中,每个数据节点对外提供的业务服务并不相同,有些数据节点的业务负载压力大,有些数据节点的业务负载压力小,在接收到升级指令后,对分布式系统的数据节点的业务负载进行分析,将业务负载压力最小的数据节点选择为待升级的第一数据节点。本发明是对分布式系统的全部数据节点进行升级,因此,待升级的第一数据节点是未升级的数据节点中的业务负载压力最小的数据节点,选择业务负载压力最小的数据节点,可以避免因数据 节点升级,将业务服务转移给其他数据节点而给分布式系统造成影响。In the embodiment of the present invention, the traffic load refers to the amount of access to the primary replica data of the data node. In a distributed system, the service services provided by each data node are not the same. Some data nodes have high traffic load pressure, and some data nodes have low traffic load pressure. After receiving the upgrade command, the data of the distributed system is received. The service load of the node is analyzed, and the data node with the lowest traffic load pressure is selected as the first data node to be upgraded. The present invention is to upgrade all the data nodes of the distributed system. Therefore, the first data node to be upgraded is the data node with the least traffic load pressure among the un-upgraded data nodes, and the data node with the lowest traffic load pressure can be avoided. Data Node upgrades, transferring business services to other data nodes and affecting distributed systems.
步骤S201,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点。Step S201: Search, according to the primary replica data identifier of the first data node, a data node that backs up the secondary replica data corresponding to the primary replica data in the first data node in the data node of the distributed system.
在分布式系统中,一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,并且为主副本数据和从副本数据设置了相同的标识,以便于根据标识查找主副本数据或从副本数据,针对不同的数据,设置了不同的标识,从而可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率。In a distributed system, a piece of data is used by multiple data nodes to back up the primary copy data and the plurality of secondary copy data of the data, and the same identification is set for the primary copy data and the copy data, so as to facilitate According to the identifier, the primary copy data or the secondary data is searched, and different identifiers are set for different data, so that the primary copy data of the data or the copy data can be accurately found, which saves the search time and improves the upgrade efficiency.
在根据步骤S200选择出待升级的第一数据节点后,需要将第一数据节点的主副本数据的业务服务转移给其他数据节点的从副本数据,当然,并不是将第一数据节点的主副本数据的业务服务转移给任意数据节点的从副本数据,而是转移给备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,此外,第一数据节点可能备份有不同数据的主副本数据,若要对该第一数据节点进行升级,就需要将第一数据节点中所有主副本数据的业务服务转移给其他数据节点的从副本数据。因此,需要根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中所有主副本数据的从副本数据的数据节点。After the first data node to be upgraded is selected according to step S200, the service service of the primary data of the first data node needs to be transferred to the secondary data of the other data node. Of course, the primary copy of the first data node is not The business service of the data is transferred to the slave copy data of any data node, but to the data node backed up with the slave copy data corresponding to the master copy data in the first data node. In addition, the first data node may back up the data with different data. The primary replica data, if the first data node is to be upgraded, needs to transfer the business services of all the primary replica data in the first data node to the secondary replica data of the other data nodes. Therefore, it is necessary to look up, in the data node of the distributed system, the data node backed up with the replica data corresponding to all the primary replica data in the first data node according to the primary replica data identifier of the first data node.
步骤S202,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。Step S202, analyzing a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and selecting at least one second data node according to the load balancing policy.
利用步骤S201查找到备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,然而,并不是将第一数据节点的业务负载转移给查找到的全部数据节点,例如,针对一份数据,有一个数据节点备份有主副本数据和两个数据节点备份有从副本数据,在将第一数据节点的该份数据的业务负载转移时,仅能转移给备份有从副本数据的两个数据节点中的一个。The data node that backs up the slave copy data corresponding to the master copy data in the first data node is found by using step S201, however, the traffic load of the first data node is not transferred to all the found data nodes, for example, for one The data has one data node backed up with the master copy data and two data node backups with the slave copy data. When the business load of the data of the first data node is transferred, only the backup data can be transferred to the backup. One of the data nodes.
在本发明实施例中,通过对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,分析数据节点的业务负载压力大小,根据负载均衡策略从其中选择出至少一个第二数据节点,其中,负载 均衡策略指分布式系统的数据节点的业务负载压力均衡,而不会出现有些数据节点的业务负载压力很大,而有些数据节点的业务负载压力很小的情况,这里不仅考虑到备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载,还要考虑到业务负载转移后,数据节点的业务负载情况。本步骤中选择的至少一个第二数据节点是业务负载压力较小的数据节点。这里根据负载均衡策略选择至少一个第二数据节点能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷。In the embodiment of the present invention, by analyzing the service load of the data node that backs up the replica data corresponding to the primary replica data in the first data node, the traffic load pressure of the data node is analyzed, and the traffic load policy is selected according to the load balancing policy. Out at least one second data node, wherein the load The equalization strategy refers to the load balancing of the traffic load of the data nodes of the distributed system, without the pressure of the traffic load of some data nodes is large, and the traffic load pressure of some data nodes is very small, here not only consider that the backup has corresponding to The traffic load of the data node of the replica data from the primary replica data in the first data node also takes into account the traffic load of the data node after the traffic load is transferred. The at least one second data node selected in this step is a data node with a small traffic load pressure. Here, selecting at least one second data node according to the load balancing policy can overcome the defect that the traffic load of the data node with high traffic load pressure is caused by the arbitrary transfer of the traffic load.
由于第一数据节点可能备份有多个主副本数据,因此根据负载均衡策略选择的数据节点也可能为多个。这里将第一数据节点的业务负载转移给至少一个第二数据节点,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时。Since the first data node may back up multiple primary replica data, there may be multiple data nodes selected according to the load balancing policy. Here, the traffic load of the first data node is transferred to the at least one second data node, so that the corresponding service service of the first data node can be continuously provided without affecting the service service of the distributed system, thereby avoiding the data node activation. Stopping caused the business service to time out.
步骤S203,将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据。Step S203, converting the copy data of the at least one second data node into the main copy data, and converting the corresponding main copy data of the first data node into the slave copy data.
在根据步骤S202选择出至少一个第二数据节点后,需要将第一数据节点的业务负载转移给至少一个第二数据节点,在分布式系统中,一般由主副本数据提供业务负载,而至少一个第二数据节点是备份有第一数据节点的主副本数据对应的从副本数据的数据节点,因此,需要将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据,从而将业务负载转移给至少一个第二数据节点。After selecting at least one second data node according to step S202, the traffic load of the first data node needs to be transferred to the at least one second data node. In the distributed system, the service load is generally provided by the primary replica data, and at least one The second data node is a data node that backs up the replica data corresponding to the primary replica data of the first data node, and therefore, the replica data of the at least one second data node needs to be converted into the primary replica data, and the first data node is The corresponding primary copy data is converted into secondary replica data, thereby transferring the traffic load to the at least one second data node.
步骤S204,对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。Step S204: Perform offline processing on the first data node to complete the upgrade of the first data node offline.
利用步骤S203将第一数据节点的业务负载转移给至少一个第二数据节点后,第一数据节点将不再提供业务服务,此时,即可将第一数据节点下线,在线下对第一数据节点进行升级。After the service load of the first data node is transferred to the at least one second data node by using step S203, the first data node will no longer provide the service service. At this time, the first data node can be offline, and the first line is offline. The data node is upgraded.
虽然上文提到了一般由数据节点的主副本数据提供业务服务,但也可能存在访问数据节点的从副本数据的情况,因此,方法还包括:Although it is mentioned above that the service service is generally provided by the primary replica data of the data node, there may also be cases where the secondary data of the data node is accessed. Therefore, the method further includes:
步骤S205,将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据。 Step S205, relocating the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
具体指,在用户对第一数据节点中从副本数据发起访问请求后,将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据,使定位后的其他数据节点中与从副本数据对应的主副本数据/从副本数据提供业务服务,其中,第一数据节点中从副本数据可以是业务负载转移前,第一数据节点所备份的从副本数据,也可以是业务负载转移后得到的从副本数据。Specifically, after the user initiates an access request from the replica data in the first data node, the access request from the replica data in the first data node is relocated to the primary replica data corresponding to the replica data in the other data node. The copy data is used to provide a service service from the primary data corresponding to the copy data from the other data nodes after the positioning, wherein the first data node may be the first data node before the copy data may be the traffic load transfer. The backup copy data can also be obtained from the copy data after the business load is transferred.
步骤S206,在第一数据节点完成升级后,对升级后的第一数据节点进行上线处理。Step S206, after the first data node completes the upgrade, performing online processing on the upgraded first data node.
在线下完成对第一数据节点升级后,需要将第一数据节点上线,以使第一数据节点继续提供业务服务。After the upgrade of the first data node is completed online, the first data node needs to be brought online, so that the first data node continues to provide service services.
在升级后的第一数据节点上线后,需要将至少一个第三数据节点的业务负载转移给升级后的第一数据节点,以使升级后的第一数据节点恢复提供业务服务,其中,升级后的第一数据节点备份有对应于第三数据节点中主副本数据的从副本数据。After the upgraded first data node is online, the service load of the at least one third data node needs to be transferred to the upgraded first data node, so that the upgraded first data node is restored to provide service services, where after the upgrade The first data node backup has slave data corresponding to the primary copy data in the third data node.
在本发明实施例中,将至少一个第三数据节点的业务负载转移给第一数据节点,指由第一数据节点代替至少一个第三数据节点提供业务服务,将至少一个第三数据节点的主副本数据的业务服务转移给第一数据节点的从副本数据。具体可以通过以下方法步骤实现:In the embodiment of the present invention, the traffic load of the at least one third data node is transferred to the first data node, where the first data node replaces the at least one third data node to provide a service service, and the at least one third data node is the master. The business service of the replica data is transferred to the slave replica data of the first data node. This can be achieved by the following method steps:
步骤S207,根据升级后的第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点。Step S207: Searching, in the data node of the distributed system, the data node backed up with the primary replica data corresponding to the replica data in the first data node after the upgrade according to the upgraded data identifier of the first data node.
在将第一数据节点上线后,需要将其他数据节点的业务负载转移给第一数据节点,第一数据节点才可以提供业务服务。After the first data node is brought online, the traffic load of other data nodes needs to be transferred to the first data node, and the first data node can provide the service service.
在将数据备份于数据节点上时,为主副本数据和从副本数据设置了相同的标识,因此,可以根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有第一数据节点的从副本数据对应的主副本数据的数据节点。When the data is backed up on the data node, the same identification is set for the primary replica data and the replica data. Therefore, the backup data may be searched for in the data node of the distributed system according to the secondary data identifier of the first data node. A data node of a data node corresponding to the primary copy data corresponding to the replica data.
步骤S208,对备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至 少一个第三数据节点。Step S208, analyzing a service load of the data node corresponding to the primary replica data corresponding to the replica data in the upgraded first data node, and selecting from the load balancing policy according to the load balancing policy One less third data node.
在根据步骤S207查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点后,对这些数据节点的业务负载进行分析,确定这些数据节点的业务负载情况,根据负载均衡策略从中选择业务负载压力较大的数据节点作为第三数据节点,从而减轻第三数据节点的业务负载,使得分布式系统的业务负载压力均衡。After searching for the data nodes corresponding to the primary replica data of the replica data in the upgraded first data node according to step S207, analyzing the traffic load of the data nodes, determining the traffic load of the data nodes, according to the load. The equalization strategy selects a data node with a large traffic load as the third data node, thereby reducing the traffic load of the third data node, and balancing the traffic load of the distributed system.
步骤S209,将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据。Step S209: Convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
在根据步骤S208选择出至少一个第三数据节点后,需要将至少一个第三数据节点的业务负载转移给第一数据节点,在分布式系统中,一般由主副本数据提供业务负载,而至少一个第三数据节点是备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,因此,需要将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据,从而将业务负载转移给第一数据节点,以使已升级数据节点恢复提供业务服务。After selecting at least one third data node according to step S208, the traffic load of the at least one third data node needs to be transferred to the first data node. In the distributed system, the service load is generally provided by the primary replica data, and at least one The third data node is a data node backed up with the primary copy data corresponding to the copy data in the first data node, and therefore, the primary copy data of the at least one third data node needs to be converted into the secondary copy data, and the upgraded The correspondence of a data node is converted from the replica data to the primary replica data, thereby transferring the traffic load to the first data node, so that the upgraded data node is restored to provide the service service.
根据本发明上述实施例提供的方法,在对分布式系统的数据节点的业务负载进行分析后,将业务负载压力最小的数据节点选择为待升级的第一数据节点,可以避免对分布式系统的业务服务造成影响,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点,能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时,在第一数据节点完成升级后,对第一数据节点进行上线处理,根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,对备份有对应于第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一 个第三数据节点,从而减轻第三数据节点的业务负载,实现了分布式系统的平滑升级。According to the method provided by the foregoing embodiment of the present invention, after analyzing the service load of the data node of the distributed system, the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided. The service service is affected. According to the primary copy data identifier of the first data node, the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found. The primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy. Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed. The system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out. After the first data node completes the upgrade, the first data node is processed online. According to the secondary data identifier of the first data node, the backup of the data node of the distributed system has a corresponding correspondence. The data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one A third data node, thereby reducing the traffic load of the third data node, and achieving a smooth upgrade of the distributed system.
图3示出了根据本发明一个实施例的分布式系统的数据节点升级装置的功能框图。如图3所示,该装置包括:选择模块300、转移模块310、升级模块320。3 shows a functional block diagram of a data node upgrade device of a distributed system in accordance with one embodiment of the present invention. As shown in FIG. 3, the device includes: a selection module 300, a transfer module 310, and an upgrade module 320.
选择模块300,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点。The selecting module 300 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
转移模块310,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。The transferring module 310 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
升级模块320,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。The upgrade module 320 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
根据本发明上述实施例提供的装置,接收升级指令,从多个数据节点中选择待升级的第一数据节点;将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据;对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级,从而实现了分布式系统的平滑升级,避免了数据节点关停和启动对分布式系统的业务服务造成的影响。The device according to the above embodiment of the present invention receives an upgrade instruction, selects a first data node to be upgraded from a plurality of data nodes, and transfers a service load of the first data node to at least one second data node, the second data node The backup has the slave copy data corresponding to the master copy data in the first data node; the first data node is processed offline to complete the upgrade of the first data node offline, thereby implementing a smooth upgrade of the distributed system and avoiding The impact of data node shutdown and startup on the business services of the distributed system.
图4示出了根据本发明另一个实施例的分布式系统的数据节点升级装置的功能框图。如图4所示,该装置包括:选择模块400、转移模块410、升级模块420。4 is a functional block diagram of a data node upgrading apparatus of a distributed system in accordance with another embodiment of the present invention. As shown in FIG. 4, the device includes: a selection module 400, a transfer module 410, and an upgrade module 420.
选择模块400,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点。The selecting module 400 is adapted to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes.
转移模块410,适于将第一数据节点的业务负载转移给至少一个第二数据节点,第二数据节点备份有对应于第一数据节点中主副本数据的从副本数据。The transfer module 410 is adapted to transfer the traffic load of the first data node to the at least one second data node, and the second data node backs up the slave replica data corresponding to the primary replica data in the first data node.
升级模块420,适于对第一数据节点进行下线处理,以在线下完成对第一数据节点的升级。The upgrade module 420 is adapted to perform offline processing on the first data node to complete the upgrade of the first data node offline.
可选地,装置还包括:处理模块430,适于在第一数据节点完成升级后, 对升级后的第一数据节点进行上线处理;Optionally, the device further includes: a processing module 430, configured to: after the first data node completes the upgrade, Performing online processing on the upgraded first data node;
转移模块410进一步适于:将至少一个第三数据节点的业务负载转移给升级后的第一数据节点,以使升级后的第一数据节点恢复提供业务服务,其中,升级后的第一数据节点备份有对应于第三数据节点中主副本数据的从副本数据。The transfer module 410 is further adapted to: transfer the traffic load of the at least one third data node to the upgraded first data node, so that the upgraded first data node resumes providing the service service, wherein the upgraded first data node The backup has secondary copy data corresponding to the primary copy data in the third data node.
可选地,转移模块410进一步适于:将至少一个第二数据节点的从副本数据转换为主副本数据,将第一数据节点的对应主副本数据转换为从副本数据。Optionally, the transferring module 410 is further adapted to: convert the copied data of the at least one second data node into the primary copy data, and convert the corresponding primary copy data of the first data node into the secondary copy data.
可选地,装置还包括:查找模块440和分析模块450。Optionally, the device further includes: a searching module 440 and an analyzing module 450.
查找模块440,适于根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据对应的从副本数据的数据节点。The searching module 440 is adapted to search, in the data node of the distributed system, the data node that is backed up with the secondary copy data corresponding to the primary copy data in the first data node according to the primary copy data identifier of the first data node.
分析模块450,适于对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。The analyzing module 450 is adapted to analyze a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and select at least one second data node from the load balancing policy.
可选地,转移模块410进一步适于:将至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的第一数据节点的对应从副本数据转换为主副本数据。Optionally, the transferring module 410 is further adapted to: convert the primary copy data of the at least one third data node into the secondary copy data, and convert the corresponding copy of the upgraded first data node from the copy data to the primary copy data.
可选地,查找模块440进一步适于:根据升级后的第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点;Optionally, the searching module 440 is further adapted to: according to the upgraded data identifier of the upgraded first data node, searching for a backup in the data node of the distributed system and corresponding to the copy data from the first data node after the upgrade Data node of the primary replica data;
分析模块450进一步适于:对备份有对应于升级后的第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。The analyzing module 450 is further configured to: analyze a service load that is backed up with a data node corresponding to the primary replica data of the replica data in the upgraded first data node, and select at least one third data node from the load balancing policy according to the load balancing policy .
可选地,选择模块400进一步适于:对分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。Optionally, the selecting module 400 is further adapted to: analyze the traffic load of the data node of the distributed system, and select the data node with the smallest traffic load as the first data node to be upgraded.
可选地,装置还包括:定位模块460,适于将针对第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与从副本数据对应的主副本数据/从副本数据。 Optionally, the apparatus further includes: a positioning module 460, configured to relocate the access request from the replica data in the first data node to the primary replica data/from the replica data corresponding to the replica data in the other data nodes.
根据本发明上述实施例提供的装置,在对分布式系统的数据节点的业务负载进行分析后,将业务负载压力最小的数据节点选择为待升级的第一数据节点,可以避免对分布式系统的业务服务造成影响,根据第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中主副本数据的从副本数据的数据节点,可以准确查找到数据的主副本数据或从副本数据,节省查找时间,提高了升级效率,对备份有对应于第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点,能够克服随意转移业务负载造成的加重业务负载压力大的数据节点的业务负担的缺陷,能够实现继续提供第一数据节点相应的业务服务,而不会对分布式系统的业务服务造成影响,从而避免了数据节点启停造成业务服务超时,在第一数据节点完成升级后,对第一数据节点进行上线处理,根据第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于第一数据节点中从副本数据的主副本数据的数据节点,对备份有对应于第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点,从而减轻第三数据节点的业务负载,实现了分布式系统的平滑升级。According to the foregoing embodiment of the present invention, after analyzing the service load of the data node of the distributed system, the data node with the lowest traffic load pressure is selected as the first data node to be upgraded, and the distributed system can be avoided. The service service is affected. According to the primary copy data identifier of the first data node, the data node in the distributed system is searched for the data node that has the secondary copy data corresponding to the primary copy data in the first data node, so that the data can be accurately found. The primary copy data or the secondary copy data saves the search time and improves the upgrade efficiency, and analyzes the service load of the data node from the duplicate data corresponding to the primary copy data in the first data node, according to the load balancing policy. Selecting at least one second data node can overcome the defect of arbitrarily transferring the traffic load of the data node with heavy traffic load pressure caused by the traffic load, and can continue to provide the corresponding service service of the first data node without being distributed. The system's business services have an impact, thus avoiding The data node starts and stops to cause the service service to time out. After the first data node completes the upgrade, the first data node is processed online. According to the secondary data identifier of the first data node, the backup of the data node of the distributed system has a corresponding correspondence. The data node of the primary replica data of the replica data is analyzed in the first data node, and the service load corresponding to the data node corresponding to the primary replica data of the replica data in the first data node is analyzed, and the traffic load is selected according to the load balancing policy. At least one third data node is eliminated, thereby reducing the traffic load of the third data node, and implementing a smooth upgrade of the distributed system.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. The structure required to construct such a system is apparent from the above description. Moreover, the invention is not directed to any particular programming language. It is to be understood that the invention may be embodied in a variety of programming language, and the description of the specific language has been described above in order to disclose the preferred embodiments of the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of the description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映 的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, the various features of the invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the claims. Rather, as reflected in the claims below As such, the inventive aspects reside in less than all features of the single embodiments disclosed above. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components. In addition to such features and/or at least some of the processes or units being mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined. Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the following claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的分布式系统的数据节点升级设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that some or all of some or all of the data node upgrade devices of the distributed system in accordance with embodiments of the present invention may be implemented in practice using a microprocessor or digital signal processor (DSP). Features. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
例如,图5示出了可以实现根据本发明的获取应用信息的方法的计算设备。该计算设备传统上包括处理器510和以存储设备520形式的计算机程序产品或者计算机可读介质。存储设备520可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存 储设备520具有存储用于执行上述方法中的任何方法步骤的程序代码531的存储空间530。例如,存储程序代码的存储空间530可以包括分别用于实现上面的方法中的各种步骤的各个程序代码531。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘、紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为例如图6所示的便携式或者固定存储单元。该存储单元可以具有与图5的计算设备中的存储设备520类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括用于执行根据本发明的方法步骤的计算机可读代码531',即可以由诸如510之类的处理器读取的代码,当这些代码由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。For example, Figure 5 illustrates a computing device that can implement a method of acquiring application information in accordance with the present invention. The computing device conventionally includes a processor 510 and a computer program product or computer readable medium in the form of a storage device 520. Storage device 520 can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Save Storage device 520 has a storage space 530 that stores program code 531 for performing any of the method steps described above. For example, storage space 530 storing program code may include various program code 531 for implementing various steps in the above methods, respectively. The program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card, or a floppy disk. Such a computer program product is typically a portable or fixed storage unit such as that shown in FIG. The storage unit may have storage segments, storage spaces, and the like that are similarly arranged to storage device 520 in the computing device of FIG. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit comprises computer readable code 531 ' for performing the steps of the method according to the invention, ie code that can be read by a processor such as 510, which when executed by the computing device causes the computing device Perform the various steps in the method described above.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。 It is to be noted that the above-described embodiments are illustrative of the invention and are not intended to be limiting, and that the invention may be devised without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Claims (18)

  1. 一种分布式系统的数据节点升级方法,在所述分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,所述方法包括:A data node upgrade method for a distributed system, in which, for a piece of data, a plurality of data nodes are respectively used for backing up primary copy data and a plurality of secondary copy data of the data, the method include:
    接收升级指令,从多个数据节点中选择待升级的第一数据节点;Receiving an upgrade instruction, selecting a first data node to be upgraded from a plurality of data nodes;
    将所述第一数据节点的业务负载转移给至少一个第二数据节点,所述第二数据节点备份有对应于所述第一数据节点中主副本数据的从副本数据;Transferring the traffic load of the first data node to at least one second data node, the second data node backing up with the slave copy data corresponding to the primary replica data in the first data node;
    对所述第一数据节点进行下线处理,以在线下完成对所述第一数据节点的升级。Performing offline processing on the first data node to complete upgrade of the first data node offline.
  2. 根据权利要求1所述的方法,其中,所述方法还包括:The method of claim 1 wherein the method further comprises:
    在所述第一数据节点完成升级后,对升级后的所述第一数据节点进行上线处理,将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点,以使升级后的所述第一数据节点恢复提供业务服务,其中,升级后的所述第一数据节点备份有对应于所述第三数据节点中主副本数据的从副本数据。After the first data node completes the upgrade, the upgraded first data node is processed online, and the service load of the at least one third data node is transferred to the upgraded first data node, so that the upgrade is performed. The first data node is restored to provide a service service, wherein the upgraded first data node backs up the slave copy data corresponding to the primary copy data in the third data node.
  3. 根据权利要求2所述的方法,其中,所述将第一数据节点的业务负载转移给至少一个第二数据节点进一步包括:The method of claim 2, wherein the transferring the traffic load of the first data node to the at least one second data node further comprises:
    将所述至少一个第二数据节点的从副本数据转换为主副本数据,将所述第一数据节点的对应主副本数据转换为从副本数据。Converting the copy data of the at least one second data node into primary copy data, and converting the corresponding primary copy data of the first data node into the secondary copy data.
  4. 根据权利要求2或3所述的方法,其中,在将所述第一数据节点的业务负载转移给至少一个第二数据节点之前,所述方法还包括:The method of claim 2 or 3, wherein before the transferring the traffic load of the first data node to the at least one second data node, the method further comprises:
    根据所述第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点;Determining, in the data node of the distributed system, a data node backed up with the secondary replica data corresponding to the primary replica data in the first data node according to the primary replica data identifier of the first data node;
    对所述备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。And analyzing, by the backup, a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and selecting at least one second data node from the backup according to the load balancing policy.
  5. 根据权利要求2-4任一项所述的方法,其中,所述将至少一个第三数 据节点的业务负载转移给升级后的所述第一数据节点进一步包括:The method of any of claims 2-4, wherein said at least one third number Transferring the traffic load of the node to the upgraded first data node further includes:
    将所述至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的所述第一数据节点的对应从副本数据转换为主副本数据。Converting the primary replica data of the at least one third data node into the secondary replica data, and converting the corresponding correspondence of the upgraded first data node from the replica data to the primary replica data.
  6. 根据权利要求4所述的方法,其中,在将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点之前,所述方法还包括:The method of claim 4, wherein before the transferring the traffic load of the at least one third data node to the upgraded first data node, the method further comprises:
    根据升级后的所述第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点;And searching, in the data node of the distributed system, a data node that is backed up with the primary replica data corresponding to the replica data in the first data node after the upgrade according to the upgraded data identifier of the first data node;
    对所述备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。And analyzing, for the backup, a traffic load corresponding to the data node of the primary data of the replica data in the upgraded first data node, and selecting at least one third data node according to the load balancing policy.
  7. 根据权利要求1-6任一项所述的方法,其中,所述从多个数据节点中选择待升级的第一数据节点进一步包括:The method of any one of claims 1-6, wherein the selecting the first data node to be upgraded from the plurality of data nodes further comprises:
    对所述分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。The service load of the data node of the distributed system is analyzed, and the data node with the smallest traffic load is selected as the first data node to be upgraded.
  8. 根据权利要求1-7任一项所述的方法,其中,在升级后的所述第一数据节点上线之前,所述方法还包括:The method according to any one of claims 1 to 7, wherein before the upgraded first data node is brought online, the method further comprises:
    将针对所述第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与所述从副本数据对应的主副本数据/从副本数据。The access request from the replica data in the first data node is relocated to the primary copy data/slave copy data corresponding to the secondary copy data in the other data nodes.
  9. 一种分布式系统的数据节点升级装置,在所述分布式系统中,针对一份数据,由多个数据节点分别用于备份该份数据的主副本数据和多个从副本数据,所述装置包括:A data node upgrading apparatus for a distributed system, in the distributed system, for a piece of data, used by a plurality of data nodes to back up primary copy data and a plurality of secondary copy data of the data, the device include:
    选择模块,适于接收升级指令,从多个数据节点中选择待升级的第一数据节点;a selection module, configured to receive an upgrade instruction, and select a first data node to be upgraded from the plurality of data nodes;
    转移模块,适于将所述第一数据节点的业务负载转移给至少一个第二数据节点,所述第二数据节点备份有对应于所述第一数据节点中主副本数据的从副本数据;a transfer module, configured to transfer a traffic load of the first data node to at least one second data node, where the second data node is backed up with secondary copy data corresponding to primary copy data in the first data node;
    升级模块,适于对所述第一数据节点进行下线处理,以在线下完成对所 述第一数据节点的升级。An upgrade module, configured to perform offline processing on the first data node, to complete the online The upgrade of the first data node.
  10. 根据权利要求9所述的装置,其中,所述装置还包括:The apparatus of claim 9 wherein said apparatus further comprises:
    处理模块,适于在所述第一数据节点完成升级后,对升级后的所述第一数据节点进行上线处理;a processing module, configured to perform online processing on the upgraded first data node after the first data node completes the upgrade;
    所述转移模块进一步适于:将至少一个第三数据节点的业务负载转移给升级后的所述第一数据节点,以使升级后的所述第一数据节点恢复提供业务服务,其中,升级后的所述第一数据节点备份有对应于所述第三数据节点中主副本数据的从副本数据。The transfer module is further adapted to: transfer the service load of the at least one third data node to the upgraded first data node, so that the upgraded first data node resumes providing service services, wherein, after the upgrade The first data node is backed up with slave copy data corresponding to the primary copy data in the third data node.
  11. 根据权利要求10所述的装置,其中,所述转移模块进一步适于:将所述至少一个第二数据节点的从副本数据转换为主副本数据,将所述第一数据节点的对应主副本数据转换为从副本数据。The apparatus of claim 10, wherein the transfer module is further adapted to: convert the copy data of the at least one second data node into primary copy data, the corresponding primary copy data of the first data node Convert to data from the copy.
  12. 根据权利要求10或11所述的装置,其中,所述装置还包括:The device according to claim 10 or 11, wherein the device further comprises:
    查找模块,适于根据所述第一数据节点的主副本数据标识,在分布式系统的数据节点中查找备份有对应于所述第一数据节点中主副本数据对应的从副本数据的数据节点;a searching module, configured to search, in the data node of the distributed system, a data node that is backed up with the secondary copy data corresponding to the primary copy data in the first data node according to the primary copy data identifier of the first data node;
    分析模块,适于对所述备份有对应于所述第一数据节点中主副本数据的从副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第二数据节点。The analyzing module is configured to analyze, for the backup, a service load of the data node from the replica data corresponding to the primary replica data in the first data node, and select at least one second data node according to the load balancing policy.
  13. 根据权利要求10-12任一项所述的装置,其中,所述转移模块进一步适于:将所述至少一个第三数据节点的主副本数据转换为从副本数据,将升级后的所述第一数据节点的对应从副本数据转换为主副本数据。The apparatus according to any one of claims 10 to 12, wherein the transfer module is further adapted to: convert main copy data of the at least one third data node into slave copy data, the upgraded The correspondence of a data node is converted from the copy data to the main copy data.
  14. 根据权利要求12所述的装置,其中,所述查找模块进一步适于:根据升级后的所述第一数据节点的从副本数据标识,在分布式系统的数据节点中查找备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点;The apparatus according to claim 12, wherein said searching module is further adapted to: look up the backup in the data node of the distributed system according to the upgraded copy data identification of the first data node, corresponding to the post-upgrade a data node of the primary data of the copy data from the first data node;
    所述分析模块进一步适于:对所述备份有对应于升级后的所述第一数据节点中从副本数据的主副本数据的数据节点的业务负载进行分析,根据负载均衡策略从其中选择出至少一个第三数据节点。 The analyzing module is further configured to: analyze, by the backup, a service load corresponding to the data node of the primary data of the replica data in the upgraded first data node, and select at least the load according to the load balancing policy A third data node.
  15. 根据权利要求9-14任一项所述的装置,其中,所述选择模块进一步适于:The apparatus of any of claims 9-14, wherein the selection module is further adapted to:
    对所述分布式系统的数据节点的业务负载进行分析,将业务负载量最小的数据节点选择为待升级的第一数据节点。The service load of the data node of the distributed system is analyzed, and the data node with the smallest traffic load is selected as the first data node to be upgraded.
  16. 根据权利要求9-15任一项所述的装置,其中,所述装置还包括:定位模块,适于将针对所述第一数据节点中从副本数据的访问请求重新定位到其他数据节点中与所述从副本数据对应的主副本数据/从副本数据。The apparatus of any of claims 9-15, wherein the apparatus further comprises: a positioning module adapted to relocate access requests from the copy data to the other data nodes in the first data node The primary copy data/from the copy data corresponding to the copy data.
  17. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-8中的任一项所述的分布式系统的数据节点升级方法。A computer program comprising computer readable code, when said computer readable code is run on a computing device, causing said computing device to perform data of a distributed system according to any of claims 1-8 Node upgrade method.
  18. 一种计算机可读介质,其中存储了如权利要求17所述的计算机程序。 A computer readable medium storing the computer program of claim 17.
PCT/CN2016/106804 2015-12-17 2016-11-22 Method and apparatus for upgrading data node of distributed system WO2017101642A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510954639.8A CN105610903B (en) 2015-12-17 2015-12-17 Data node upgrading method and device for distributed system
CN201510954639.8 2015-12-17

Publications (1)

Publication Number Publication Date
WO2017101642A1 true WO2017101642A1 (en) 2017-06-22

Family

ID=55990437

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/106804 WO2017101642A1 (en) 2015-12-17 2016-11-22 Method and apparatus for upgrading data node of distributed system

Country Status (2)

Country Link
CN (1) CN105610903B (en)
WO (1) WO2017101642A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105610903B (en) * 2015-12-17 2020-02-18 北京奇虎科技有限公司 Data node upgrading method and device for distributed system
CN106354531B (en) * 2016-08-25 2020-03-27 杭州华为数字技术有限公司 Physical node upgrading method and device
CN109561125B (en) * 2017-09-27 2021-11-09 阿里巴巴集团控股有限公司 Data transmission method, method and device for copying data in distributed system
CN107943510A (en) * 2017-11-23 2018-04-20 郑州云海信息技术有限公司 Distributed memory system upgrade method, system, device and readable storage medium storing program for executing
CN111142921A (en) * 2018-11-02 2020-05-12 成都鼎桥通信技术有限公司 Software upgrading method and device
CN112711376B (en) * 2019-10-25 2022-12-23 北京金山云网络技术有限公司 Method and device for determining object master copy file in object storage system
CN114697213A (en) * 2022-03-30 2022-07-01 联想(北京)有限公司 Upgrading method and device
CN115955399B (en) * 2022-12-12 2023-09-15 安芯网盾(北京)科技有限公司 Method and system for upgrading and downgrading distributed multi-node detection engine
CN116680256B (en) * 2023-07-21 2024-01-09 腾讯科技(深圳)有限公司 Database node upgrading method and device and computer equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130246498A1 (en) * 2012-03-16 2013-09-19 Stephen Zucknovich Content distribution management system
CN103970567A (en) * 2014-04-28 2014-08-06 浪潮电子信息产业股份有限公司 Method for online upgrading of cloud storage system firmware
CN104954444A (en) * 2015-05-27 2015-09-30 华为技术有限公司 Cached data migration method and device
CN105610903A (en) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 Data node upgrading method and device for distributed system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729436A (en) * 2013-12-27 2014-04-16 中国科学院信息工程研究所 Distributed metadata management method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130246498A1 (en) * 2012-03-16 2013-09-19 Stephen Zucknovich Content distribution management system
CN103970567A (en) * 2014-04-28 2014-08-06 浪潮电子信息产业股份有限公司 Method for online upgrading of cloud storage system firmware
CN104954444A (en) * 2015-05-27 2015-09-30 华为技术有限公司 Cached data migration method and device
CN105610903A (en) * 2015-12-17 2016-05-25 北京奇虎科技有限公司 Data node upgrading method and device for distributed system

Also Published As

Publication number Publication date
CN105610903B (en) 2020-02-18
CN105610903A (en) 2016-05-25

Similar Documents

Publication Publication Date Title
WO2017101642A1 (en) Method and apparatus for upgrading data node of distributed system
US10045397B2 (en) Data complementing method and apparatus
US6983352B2 (en) System and method for point in time backups
US9122647B2 (en) System and method to backup objects on an object storage platform
US8880488B1 (en) Efficient extent-based B-tree insertion
US10613847B2 (en) Information handling system to treat demoted firmware with replacement firmware
US10459812B2 (en) Seamless method for booting from a degraded software raid volume on a UEFI system
US20170168756A1 (en) Storage transactions
CN106970856B (en) Data management system and method for backing up, recovering and mounting data
US20190278509A1 (en) Information Handling System with Multi-key Secure Erase of Distributed Namespace
US10466919B2 (en) Information handling system with elastic configuration pools in flash dual in-line memory modules
CN107391303B (en) Data processing method, device, system, server and computer storage medium
CN106682021B (en) Database migration method and device
WO2016101759A1 (en) Data routing method, data management device and distributed storage system
US20140046905A1 (en) Organized Data Removal or Redirection from a Cloning Process to Enable Cloning a Larger System to a Smaller System
WO2016101751A1 (en) Master and slave balancing method and device in distributed storage system
US10789087B2 (en) Insight usage across computing nodes running containerized analytics
CN112231403B (en) Consistency verification method, device, equipment and storage medium for data synchronization
US10387268B2 (en) Fast copy using file system block mappings
US20180253360A1 (en) Database Failure Recovery in an Information Handling System
CN109120674B (en) Deployment method and device of big data platform
WO2016091068A1 (en) Method and device for executing special instruction
KR101881637B1 (en) Job process method and system for genome data analysis
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
US9971532B2 (en) GUID partition table based hidden data store system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16874699

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16874699

Country of ref document: EP

Kind code of ref document: A1