WO2019232932A1 - 节点处理方法及装置、计算机可读存储介质和电子设备 - Google Patents

节点处理方法及装置、计算机可读存储介质和电子设备 Download PDF

Info

Publication number
WO2019232932A1
WO2019232932A1 PCT/CN2018/101023 CN2018101023W WO2019232932A1 WO 2019232932 A1 WO2019232932 A1 WO 2019232932A1 CN 2018101023 W CN2018101023 W CN 2018101023W WO 2019232932 A1 WO2019232932 A1 WO 2019232932A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
routing
cluster
remaining nodes
data slot
Prior art date
Application number
PCT/CN2018/101023
Other languages
English (en)
French (fr)
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 WO2019232932A1 publication Critical patent/WO2019232932A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Definitions

  • the present application relates to the field of data storage technology, and in particular, to a node processing method, a node processing apparatus, a computer-readable storage medium, and an electronic device.
  • Time series database is more and more popular with developers due to its orderly, intuitive, and easy to distinguish.
  • influxdb has been widely used in multiple application scenarios such as log monitoring.
  • the influxdb cluster may not match the actual storage service.
  • the inventor of the present application realizes that the cluster needs to be shrunk; in another case, when a node in the cluster such as hardware performance , Network connection, actual service requirements and other reasons cannot adapt to the business, the inventor of this application realizes that the node needs to be deleted from the cluster. At present, there is no plan to delete nodes in the influxdb cluster.
  • One of the objectives of this application is to provide a node processing method, a node processing device, a computer-readable storage medium, and an electronic device, so as to at least to some extent solve the problem of how to delete a node in an influxdb cluster in the related technology.
  • a node processing method is provided, which is applied to an influxdb cluster.
  • the node processing method includes: obtaining routing statistics information of each data slot in each node of the cluster; and according to the routing statistics of each data slot The information determines the routing pressure of the remaining nodes in the cluster except for a target node; the data slots of the target node are transferred to the remaining nodes according to the routing pressure of the remaining nodes.
  • a node processing device which is applied to an influxdb cluster.
  • the node processing device includes a routing information acquisition module configured to obtain routing statistical information of each data slot in each node of the cluster.
  • a routing pressure determination module configured to determine the routing pressure of the other nodes in the cluster except a target node according to the routing statistics of each data slot;
  • a data slot transfer module configured to The routing pressure of the remaining nodes transfers the data slots of the target node to the remaining nodes.
  • a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, causes the processor to perform the following processing applied to an influxdb cluster:
  • an electronic device including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions by The electronic device is caused to perform the following processing applied to the influxdb cluster:
  • the routing pressure of the other nodes except the target node is determined according to the routing statistical information of each data slot in each node of the cluster, and the target node's routing pressure is determined according to the determined routing pressure.
  • the data slot is transferred to the remaining nodes.
  • the cluster can be shrunk to avoid the problem of wasting resources due to the excessive number of nodes.
  • the trough transfer process does not require human involvement, which improves the efficiency and accuracy of the transfer.
  • FIG. 1 schematically illustrates a flowchart of a node processing method according to an exemplary embodiment of the present application.
  • FIG. 2 schematically illustrates a block diagram of a node processing apparatus according to an exemplary embodiment of the present application.
  • FIG. 3 schematically illustrates a block diagram of another node processing apparatus according to an exemplary embodiment of the present application.
  • FIG. 4 schematically illustrates a block diagram of a routing information acquisition module according to an exemplary embodiment of the present application.
  • FIG. 5 schematically illustrates a block diagram of a data slot transfer module according to an exemplary embodiment of the present application.
  • FIG. 6 schematically illustrates a block diagram of a data slot transfer unit according to an exemplary embodiment of the present application.
  • FIG. 7 schematically illustrates a block diagram of still another node processing apparatus according to an exemplary embodiment of the present application.
  • FIG. 8 shows a schematic diagram of a storage medium according to an exemplary embodiment of the present application.
  • FIG. 9 schematically illustrates a block diagram of an electronic device according to an exemplary embodiment of the present application.
  • the client can assign a unique identifier to each piece of data to be written; then, after the routing node obtains the data, the unique identifier can be hashed to obtain a corresponding hash value, and the hash value can be obtained. Divide by a preset value (for example, 16384) and take the remainder to determine the data slot corresponding to each piece of data.
  • the correspondence between data slots and influxdb nodes has been pre-configured. For example, 16384 data slots can be mapped to two influxdb nodes, of which the first influxdb node stores the first data slot to the 8192th data. Slot, the second influxdb node stores the 8193th data slot to the 16384th data slot.
  • the present application provides a node processing method and device, so as to better solve the above problems.
  • FIG. 1 schematically illustrates a node processing method according to an exemplary embodiment of the present application.
  • the node processing method can be applied to an influxdb cluster.
  • the node processing method described below can also be applied to other clusters.
  • a node processing method method may include the following steps:
  • a cluster can be composed of multiple nodes, and each node can include one or more data slots.
  • the server When the server writes data, it can write data to a data slot of a node in the cluster.
  • the specific writing process can refer to the sharding scheme described above.
  • the server when data needs to be read, the server can read the data from the data slots of the nodes in the cluster.
  • Data slot routing can mean the process of reading data from or writing data to the data slot each time.
  • the routing statistical information described in this application may include the routing frequency of the data slot, that is, the number of routes in a unit time.
  • the routing statistical information may also include information such as the total number of routing times of the data slot and the routing time, which is not limited in this application.
  • the server may obtain routing information of the data slot and perform statistics to obtain routing statistical information.
  • the routing statistical information of each data slot in the cluster can be persisted into a configuration file at a predetermined time, where the predetermined time can be set based on actual business needs, for example, it can be 8 hours, 24 hours, and so on.
  • the configuration file may be a storage unit existing in the server, and may be a file configured in other forms. The specific format and storage location of the configuration file are not specifically limited in this application.
  • the server obtaining the routing statistical information of each data slot in each node of the cluster may include directly obtaining the routing statistical information of each data slot in each node from the configuration file.
  • the server may determine the node in the cluster whose processing capacity is lower than a preset standard as the target node.
  • the preset standard may be set by the cluster administrator, for example.
  • the preset standard can be comprehensively set by referring to factors such as the data read / write speed and capacity of the node, and the preset standard can also be associated with the actual storage service, which is not particularly limited in this exemplary embodiment.
  • the server may respond to a node deletion instruction, and determine the node corresponding to the node deletion instruction as the target node. Specifically, first, the server may receive a node deletion instruction, and the node deletion instruction may include identification information of the node (for example, an address, a node name, etc.), and then, the server determines the corresponding identification information in the cluster according to the identification information. Node as the target node.
  • target node is described as one node in the exemplary embodiment of the present application, it is easy to understand that the target node described in the present application may refer to multiple nodes.
  • the server can determine the routing pressure of the other nodes in the cluster except the target node.
  • the routing pressure described herein may refer to the number of routings of all data slots on a node within a preset time period, and the preset time period may be, for example, 8 hours, 12 hours, or 24 hours.
  • the routing pressure may also be determined comprehensively by using statistical characteristics of the routing statistics of all data slots on the node. The statistical characteristics may include, but are not limited to, an average value and a standard deviation of the total number of routings.
  • routing pressure described in this application can be shown in the form of numerical values.
  • the server may calculate the ratio of the routing pressure of the remaining nodes according to the routing pressure determined in step S14, for example, the remaining nodes are three nodes, and the ratio of their routing pressure is, for example, 2: 3: 5.
  • the data slots of the target node can be transferred to the remaining nodes according to the calculated ratio.
  • the data slot of the target node can be divided into 10 parts according to the routing pressure of the data slot of the target node. Specifically, 5 parts are transferred to the node with a routing pressure ratio of 2 and 3 parts are transferred to the routing pressure ratio. For a node of 3, transfer 2 copies to a node with a routing pressure ratio of 5.
  • weights may be configured for each node in the cluster in advance, wherein the weights may be related to the read and write capabilities of each node, that is, the stronger the read and write capabilities of the nodes, the greater the weight.
  • the weight can also be related to the storage capacity of each node.
  • This application can also comprehensively consider the read and write capabilities, storage capacity, and other node attributes to determine the weight of a node. In addition, this application does not specifically limit the storage address of the weight information.
  • the server can obtain the weights of the remaining nodes in the cluster except the target node, and then transfer the data slots of the target node to the remaining nodes according to the above ratio and combine the weights of the remaining nodes.
  • the routing pressure can be inversely proportional to the number of data slots received, and the weight can be directly proportional to the number of data slots received.
  • the unit of transfer is a data slot.
  • the data slot When the data slot is transferred, the data in the data slot can be transferred together. Therefore, the release of the target node service can be completed without affecting the original data distribution mode.
  • the above process can well realize the load balancing of the nodes.
  • the exemplary embodiment of the present application may further include deleting the target node from the cluster.
  • the term "deletion” in this application may refer to removing the target node from the architecture of the cluster. After the target node is deleted, the hardware physical form of the target node and its own processing functions still exist, but the target node is no longer part of the above cluster.
  • the number of times of routing can be saved in the configuration file, and the information recorded in the configuration file can be similar to the following:
  • Data slot 1 The total number of routes is 10000, and the routing frequency is 10 / s;
  • Data slot 2 total number of routes 5000, routing frequency 1 / s;
  • the server can separately calculate the routing pressure of node A, node B, and node C.
  • the routes here The pressure can be the number of routings of all data slots on the node in an hour. Therefore, the statistics of the routing pressures of node A, node B, and node C can be 10,000, 5000, and 15,000, respectively.
  • the ratio of the routing pressure between node A and node B is 2: 1.
  • the node pressure of node C can be divided into 10,000 and 5000 according to 2: 1, and the number of routing times of 5000 can be transferred to node A, and the number of routing times of 10,000 can be transferred to node B.
  • start the transfer from the first data slot of the node and accumulate the number of routes of each data slot until the number of routes accumulated to node C reaches 5000, and transfer the data slot corresponding to this number of routes to node A. At this point, for example, 65 data slots have been transferred.
  • the number of routes is accumulated from zero until the accumulated number of routes reaches 10,000 or all data slots have been scanned, and this part of the data slots is transferred to Node B.
  • the remaining data slots can be directly transferred to node B after the statistical data slots are transferred to node A.
  • weights can be combined to achieve the transfer of data slots. Still using the above as an example, if the weight of node A is 1 and the weight of node B is 2, the data slot routing times of node C can be divided by 1: 4. In this case, the number of routes of the data slot obtained by node A is 3000, and the data slot that received the transfer of node C may be the first data slot to the 50th data slot; the number of routes of the data slot obtained by node B is In 12000, the data slot that received the transfer from node C may be the 51st data slot to the 180th data slot.
  • the cluster can be shrunk to avoid the problem of wasting resources due to the excessive number of nodes; another On the one hand, the data slot transfer process of the target node does not require human participation, which improves the efficiency and accuracy of the transfer; on the other hand, the data slot transfer is realized due to routing pressure. Therefore, the load balancing of the system is better achieved.
  • a node processing apparatus is provided in this exemplary embodiment, and the node processing apparatus is applied to an influxdb cluster.
  • FIG. 2 schematically illustrates a block diagram of a node processing apparatus according to an exemplary embodiment of the present application.
  • the node processing apparatus 2 may include a routing information acquisition module 21, a routing pressure determination module 23, and a data slot transfer module 25.
  • the routing information obtaining module 21 may be configured to obtain routing statistical information of each data slot in each node of the cluster; the routing pressure determining module 23 may be configured to determine the routing information based on the routing statistical information of each data slot.
  • the routing pressure of the remaining nodes in the cluster except a target node is described; the data slot transfer module 25 may be configured to transfer the data slots of the target node to the remaining nodes according to the routing pressure of the remaining nodes.
  • the cluster can be shrunk to avoid the problem of wasting resources due to the excessive number of nodes; another On the one hand, the data slot transfer process of the target node does not require human involvement, which improves the efficiency and accuracy of the transfer.
  • the node processing device 3 may include a node in addition to a routing information acquisition module 21, a routing pressure determination module 23, and a data slot transfer module 25. Remove module 31.
  • the node deletion module 31 may be configured to delete the target node from the cluster.
  • the routing statistical information of each data slot in the cluster is persisted into a configuration file at a predetermined time.
  • the routing information acquisition module 21 may include a routing information acquisition unit 401.
  • the routing pressure is the number of times that all data slots on a node are routed within a preset period of time.
  • the data slot transfer module 25 includes a ratio calculation unit 501 and a data slot transfer unit 503.
  • the ratio calculation unit 501 may be configured to calculate the ratio of the routing pressure of the remaining nodes; the data slot transfer unit 503 may be configured to transfer the data slot of the target node to the remaining nodes according to the ratio Node.
  • the data slot transfer unit 503 may include a weight acquisition sub-unit 6001 and a data slot transfer sub-unit 6003.
  • the node processing device 7 is compared with the node processing device 3 except that it includes a routing information acquisition module 21, a routing pressure determination module 23, a data slot transfer module 25, and a node deletion module 31. It may further include a first target node determination module 71 or a second target node determination module 73.
  • the first target node determination module 71 may be configured to determine a node in the cluster whose processing capacity is lower than a preset standard as a target node; the second target node determination module 73 may be configured to respond to a node A delete instruction, and a node corresponding to the node delete instruction is determined as a target node.
  • a computer-readable storage medium is also provided, where a computer program is stored, and when the computer program is executed by the processor, the processor causes the processor to execute the method embodiments described above.
  • aspects of the present application may also be implemented in the form of a program product, which includes program code.
  • the program product runs on a terminal device, the program code is used to make the program product
  • the terminal device performs the steps according to various exemplary embodiments of the present application described in the above-mentioned "exemplary method" section of this specification.
  • a program product 800 for implementing the above method according to an embodiment of the present application is described, which may adopt a portable compact disc read-only memory (CD-ROM) and include program code, and may be implemented in a terminal device. For example running on a personal computer.
  • the program product of the present application is not limited thereto.
  • the readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • the program product may employ any combination of one or more readable media.
  • the readable medium may be a readable signal medium or a readable storage medium.
  • the readable storage medium may be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more wires, portable disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the foregoing.
  • the computer-readable signal medium may include a data signal in baseband or propagated as part of a carrier wave, which carries readable program code. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the readable signal medium may also be any readable medium other than a readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
  • the program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • the program code for performing the operations of this application can be written in any combination of one or more programming languages, which includes object-oriented programming languages—such as Java, C ++, etc.—and also includes conventional procedural Programming language—such as "C" or a similar programming language.
  • the program code can be executed entirely on the user computing device, partly on the user device, as an independent software package, partly on the user computing device, partly on the remote computing device, or entirely on the remote computing device or server On.
  • the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (such as provided by an Internet service) (Commercially connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • an Internet service Commercially connected via the Internet
  • an electronic device capable of implementing the above method is also provided.
  • FIG. 9 An electronic device 900 according to this embodiment of the present application is described below with reference to FIG. 9.
  • the electronic device 900 shown in FIG. 9 is merely an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present application.
  • the electronic device 900 is expressed in the form of a general-purpose computing device.
  • the components of the electronic device 900 may include, but are not limited to, the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.
  • the storage unit stores program code, and the program code can be executed by the processing unit 910, so that the processing unit 910 executes various exemplary embodiments according to the present application described in the "exemplary method" section of the present specification. Steps of the implementation.
  • the processing unit 910 may perform steps S12 to S16 as shown in FIG. 1.
  • the storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202, and may further include a read-only storage unit (ROM) 9203.
  • RAM random access storage unit
  • ROM read-only storage unit
  • the storage unit 920 may also include a program / utility tool 9204 having a set (at least one) of program modules 9205, such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data, Each or some combination of these examples may include an implementation of a network environment.
  • the bus 930 may be one or more of several types of bus structures, including a memory unit bus or a memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local area using any bus structure in a variety of bus structures bus.
  • the electronic device 900 may also communicate with one or more external devices 1000 (such as a keyboard, pointing device, Bluetooth device, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or with Any device (eg, router, modem, etc.) that enables the electronic device 900 to communicate with one or more other computing devices. This communication can be performed through an input / output (I / O) interface 950. Moreover, the electronic device 900 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) through the network adapter 960.
  • LAN local area network
  • WAN wide area network
  • public network such as the Internet
  • the network adapter 960 communicates with other modules of the electronic device 900 through the bus 930. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives And data backup storage systems.
  • the technical solution according to the embodiment of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a U disk, a mobile hard disk, etc.) or on a network , Including several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present application.
  • a computing device which may be a personal computer, a server, a terminal device, or a network device, etc.
  • modules or units of the device for action execution are mentioned in the detailed description above, this division is not mandatory.
  • the features and functions of two or more modules or units described above may be embodied in one module or unit.
  • the features and functions of a module or unit described above can be further divided into multiple modules or units to be embodied.

Abstract

一种节点处理方法及装置、计算机可读存储介质和电子设备,涉及数据存储技术领域。该节点处理方法包括:获取集群各节点中每一数据槽的路由统计信息(S12);根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力(S14);根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上(S16)。该方法可以较好地实现influxdb集群的收缩。

Description

节点处理方法及装置、计算机可读存储介质和电子设备 技术领域
相关申请的交叉引用 : 本申请要求2018年6月5日递交、发明名称为“节点处理方法及装置、存储介质和电子设备”的中国专利申请CN201810578276.6的优先权,在此通过引用将其全部内容合并于此。
本申请涉及数据存储技术领域,具体而言,涉及一种节点处理方法、节点处理装置、计算机可读存储介质和电子设备。
背景技术
时序数据库以其时间有序、直观、便于区分等优点,越来越受到开发人员青睐。作为目前关注度最高的时序数据库之一,influxdb已广泛应用到例如日志监控的多个应用场景中。
由于网络、节点硬件设备、业务内容等原因,influxdb集群可能与实际存储业务不匹配。在一种情况下,当influxdb集群的节点数量过多、而使用率较低时,本申请的发明人意识到需要对集群进行收缩;在另一种情况下,当集群中一节点例如硬件性能、网络连接、实际业务要求等原因无法适应业务时,本申请的发明人意识到需要将该节点从集群中删除。而目前,没有删除influxdb集群中节点的方案。
需要说明的是,在上述背景技术部分公开的信息仅用于加强对本申请的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
技术问题
本申请的目的之一在于提供一种节点处理方法、节点处理装置、计算机可读存储介质和电子设备,进而至少在一定程度上解决相关技术不存在如何删除influxdb集群中节点的问题。
技术解决方案
根据本申请的一个方面,提供一种节点处理方法,应用于influxdb集群,所述节点处理方法包括:获取集群各节点中每一数据槽的路由统计信息;根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的另一方面,提供一种节点处理装置,应用于influxdb集群,所述节点处理装置包括:路由信息获取模块,其被配置用于获取集群各节点中每一数据槽的路由统计信息;路由压力确定模块,其被配置用于根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;数据槽转移模块,其被配置用于根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的又一方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时使得处理器执行应用于influxdb集群的如下处理:
获取集群各节点中每一数据槽的路由统计信息;
根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的又一方面,提供一种电子设备,包括:处理器;以及存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令而使得所述电子设备执行应用于influxdb集群的如下处理:
获取集群各节点中每一数据槽的路由统计信息;
根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
有益效果
在本申请的一些实施例所提供的技术方案中,通过根据集群各节点中每一数据槽的路由统计信息确定除目标节点外其余节点的路由压力,并根据确定出的路由压力将目标节点的数据槽转移到其余节点上,一方面,通过将目标节点的数据槽转移到集群中其余节点上,可以收缩集群,避免由于节点数量过多,浪费资源的问题;另一方面,目标节点的数据槽转移过程无需人为参与,提高了效率和转移的准确率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:
图1示意性示出了根据本申请的示例性实施方式的节点处理方法的流程图。
图2示意性示出了根据本申请的示例性实施方式的节点处理装置的方框图。
图3示意性示出了根据本申请的示例性实施方式的另一节点处理装置的方框图。
图4示意性示出了根据本申请的示例性实施方式的路由信息获取模块的方框图。
图5示意性示出了根据本申请的示例性实施方式的数据槽转移模块的方框图。
图6示意性示出了根据本申请的示例性实施方式的数据槽转移单元的方框图。
图7示意性示出了根据本申请的示例性实施方式的再一节点处理装置的方框图。
图8示出了根据本申请的示例性实施方式的存储介质的示意图。
图9示意性示出了根据本申请的示例性实施方式的电子设备的方框图。
本发明的实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本申请的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本申请的各方面变得模糊。
此外,附图仅为本申请的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
附图中所示的流程图仅是示例性说明,不是必须包括所有的步骤。例如,有的步骤还可以分解,而有的步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。
在描述本申请的示例性实施方式的节点处理方法及装置之前,对influxdb的集群分片方案进行说明。
具体的,首先,客户端可以对每一条待写入的数据分配一个唯一标识;随后,在路由节点获取这些数据后,可以对唯一标识进行哈希处理得到对应的哈希值,将哈希值除以一预设值(例如,16384)后取余,以确定每一条数据对应的数据槽(slot);接下来,将每一条数据发送至数据槽对应的influxdb节点上。其中,数据槽与influxdb节点的对应关系已预先进行配置,例如,可以将16384个数据槽分别对应到两个influxdb节点上,其中,第一个influxdb节点存储第1个数据槽至第8192个数据槽,第二个influxdb节点存储第8193个数据槽至第16384个数据槽。
然而,influxdb集群的问题在于:当一节点由于节点硬件、网络连接等原因无法满足存储业务需求时,目前没有将该节点从集群中删除的较好的方案。另外,当集群中节点数量过多,而节点使用率较低时,如何对集群进行收缩。
鉴于此,本申请提供了一种节点处理方法及装置,以期可以较好地解决上述问题。
图1示意性示出了本申请的示例性实施方式的节点处理方法,该节点处理方法可以应用于influxdb集群。然而,应当注意的是,采用下面描述的节点处理方法还可以应用到其他集群中。
参考图1,本申请的示例性实施方式的节点处理方法方法可以包括以下步骤:
S12. 获取集群各节点中每一数据槽的路由统计信息。
应当理解的是,集群可以由多个节点构成,而每个节点又可以包括一个或多个数据槽,服务器在写入数据时,可以将数据写入集群某个节点的某个数据槽中,具体写入的过程可以参见上面描述的分片方案。另外,当需要读取一数据时,服务器可以从集群中节点的数据槽中读取该数据。
数据槽的路由可以意指每次从数据槽中读取数据或写入数据的过程。本申请所述的路由统计信息可以包括数据槽的路由频率,也就是单位时间内的路由次数。另外,路由统计信息还可以包括数据槽的总路由次数、路由时间等信息,本申请对此不做限定。
在本申请的示例性实施方式中,数据槽在进行路由时,服务器可以获取数据槽的路由信息,并进行统计以得到路由统计信息。另外,可以每隔预定时间将集群中各数据槽的路由统计信息持久化到一配置文件中,其中,该预定时间可以基于实际业务需要进行设定,例如,可以为8小时、24小时等。该配置文件可以是存在于服务器中的存储单元,可以是以其他形式配置的文件,本申请对配置文件的具体格式和存储位置不做特殊限定。
具体的,服务器获取集群各节点中每一数据槽的路由统计信息可以包括从配置文件中直接获取各节点中每一数据槽的路由统计信息。
S14. 根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力。
针对如何确定目标节点,根据本申请的一些实施例,服务器可以自行将集群中处理能力低于一预设标准的节点确定为目标节点,其中,预设标准可以由集群管理人员自行设定,例如,可以参考节点的数据读写速度、容量等因素综合设定该预设标准,该预设标准还可以与实际存储业务相关联,本示例性实施方式中对此不做特殊限定。
根据另外一些实施例,服务器可以响应一节点删除指令,将节点删除指令对应的节点确定为目标节点。具体的,首先,服务器可以接收一节点删除指令,该节点删除指令中可以包含节点的标识信息(例如,地址、节点名称等),随后,服务器根据该标识信息在集群中确定与标识信息对应的节点作为目标节点。
虽然在本申请的示例性实施方式中以目标节点为一个节点进行说明,然而,容易理解的是,本申请所述的目标节点可以指代多个节点。
在确定出目标节点后,服务器可以确定集群中除目标节点外其余节点的路由压力。此处所述的路由压力可以指节点上所有数据槽在一预设时间段内的路由次数,该预设时间段可以例如为8小时、12小时、24小时等。在本申请的另一些实例中,路由压力还可以采用节点上所有数据槽的路由统计信息的统计特征来综合确定。其中,统计特征可以包括但不限于总路由次数的平均值、标准差等。
由此可见,本申请所述的路由压力可以以数值的形式示出。
S16. 根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的一些实施例,首先,服务器可以根据步骤S14中确定的路由压力计算其余节点的路由压力的比例,例如,其余节点为三个节点,它们的路由压力的比例例如为2:3:5。
接下来,可以根据计算出的比例将目标节点的数据槽转移到其余节点。仍以上述为例,可以按目标节点的数据槽的路由压力将目标节点的数据槽分成10份,具体的,将5份转移给路由压力比例为2的节点,将3份转移给路由压力比例为3的节点,将2份转移给路由压力比例为5的节点。
根据本申请的另一些实施例,可以预先对集群中每一节点配置权重,其中,权重可以与每个节点的读写能力有关,也就是说,节点的读写能力越强,权重越大。另外,权重还可以与每个节点的存储容量有关。本申请还可以综合考虑读写能力、存储容量及其他节点属性来确定出节点的权重。此外,本申请对权重信息的存放地址不做特殊限定。
在这种情况下,服务器可以获取集群中除目标节点之外的其余节点的权重,然后,根据上述比例并结合其余节点的权重将目标节点的数据槽转移到其余节点上。
容易理解的是,针对上述其余节点中的每一节点,路由压力可以与接收到的数据槽数量成反比关系,而权重可以与接收到的数据槽数量成正比关系。
此外,需要注意的是,转移的单位为数据槽,在转移数据槽的同时,可以将数据槽中的数据一并转移。由此,可以在不影响原先数据分配方式的情况下,完成对目标节点业务的释放。另外,上述过程可以较好地实现节点的负载均衡。
在步骤S16之后,本申请的示例性实施方式还可以包括将目标节点从集群中删除。应当注意的是,本申请的术语“删除”可以指将目标节点从集群的架构中剔除。删除目标节点后,目标节点的硬件物理形式及自身的处理功能还存在,只是该目标节点已不属于上述集群的组成部分。
下面将参考一实例对上述节点处理方法进行说明。
数据槽路由(如写入数据)时,可以将路由的次数保存在配置文件中,配置文件记录的信息可以类似如下:
数据槽1:总路由次数10000,路由频率10/s;
数据槽2:总路由次数5000,路由频率1/s;
……
如果集群中存在三个节点A、B、C,当需要删除节点C(即节点C为上述的目标节点)时,服务器可以分别统计节点A、节点B、节点C的路由压力,此处的路由压力可以是节点上所有数据槽在1小时内的路由次数。由此,统计出的节点A、节点B、节点C的路由压力可以分别为10000、5000、15000。
由此可知,节点A与节点B的路由压力的比例为2:1。在这种情况下,可以将节点C的节点压力按2:1分为10000和5000,可以将5000的路由次数转移给节点A,将10000的路由次数转移给节点B。例如,从节点的第1个数据槽开始转移,累加各数据槽的路由次数,直到累加到节点C的路由次数达到5000时,将这部分路由次数对应的数据槽转移给节点A。此时例如已经转移了65个数据槽。接下来,以第66个数据槽作为起始,从零开始累加路由次数,直到累加的路由次数达到10000或所有数据槽扫描完毕,将这部分数据槽转移给节点B。当然,由于只有节点A和节点B接收节点C转移的数据槽,可以在将统计出的数据槽转移给节点A后,直接将剩余的数据槽转移给节点B。
此外,在另一个实例中,可以结合权重来实现数据槽的转移。仍以上述为例,如果节点A的权重为1,节点B的权重为2,则可以将节点C的数据槽路由次数按1:4进行划分。在这种情况下,节点A获得的数据槽的路由次数为3000,接收到节点C转移的数据槽可能是第1个数据槽至第50个数据槽;节点B获得的数据槽的路由次数为12000,接收到节点C转移的数据槽可能是第51个数据槽至第180个数据槽。
在本申请的示例性实施方式的节点处理方法中,一方面,通过将目标节点的数据槽转移到集群中其余节点上,可以收缩集群,避免由于节点数量过多,浪费资源的问题;另一方面,目标节点的数据槽转移过程无需人为参与,提高了效率和转移的准确率;再一方面,由于根据路由压力而实现数据槽的转移。由此,较好地实现了系统的负载均衡。
应当注意,尽管在附图中以特定顺序描述了本申请中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。
进一步的,本示例实施方式中还提供了一种节点处理装置,该节点处理装置应用于influxdb集群。
图2示意性示出了本申请的示例性实施方式的节点处理装置的方框图。参考图2,根据本申请的示例性实施方式的节点处理装置2可以包括路由信息获取模块21、路由压力确定模块23和数据槽转移模块25。
具体的,路由信息获取模块21可以被配置用于获取集群各节点中每一数据槽的路由统计信息;路由压力确定模块23可以被配置用于根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;数据槽转移模块25可以被配置用于根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
在本申请的示例性实施方式的节点处理装置中,一方面,通过将目标节点的数据槽转移到集群中其余节点上,可以收缩集群,避免由于节点数量过多,浪费资源的问题;另一方面,目标节点的数据槽转移过程无需人为参与,提高了效率和转移的准确率。
根据本申请的示例性实施例,参考图3,节点处理装置3相比于节点处理装置2,除包括路由信息获取模块21、路由压力确定模块23和数据槽转移模块25外,还可以包括节点删除模块31。
具体的,节点删除模块31可以被配置用于将所述目标节点从所述集群中删除。
根据本申请的示例性实施例,每隔预定时间将所述集群中各数据槽的路由统计信息持久化到一配置文件中。参考图4,路由信息获取模块21可以包括路由信息获取单元401。
根据本申请的示例性实施例,路由压力为节点上所有数据槽在一预设时间段内的路由次数。
根据本申请的示例性实施例,参考图5,数据槽转移模块25包括比例计算单元501和数据槽转移单元503。
具体的,比例计算单元501可以被配置用于计算所述其余节点的路由压力的比例;数据槽转移单元503可以被配置用于根据所述比例将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的示例性实施例,参考图6,数据槽转移单元503可以包括权重获取子单元6001和数据槽转移子单元6003。
具体的,权重获取子单元6001可以被配置用于获取所述其余节点的权重;数据槽转移子单元6003可以被配置用于根据所述比例并结合所述其余节点的权重将所述目标节点的数据槽转移到所述其余节点上。
根据本申请的示例性实施例,参考图7,节点处理装置7相比于节点处理装置3,除包括路由信息获取模块21、路由压力确定模块23、数据槽转移模块25和节点删除模块31外,还可以包括第一目标节点确定模块71或第二目标节点确定模块73。
具体的,第一目标节点确定模块71可以被配置用于将所述集群中处理能力低于一预设标准的节点确定为目标节点;第二目标节点确定模块73可以被配置用于响应一节点删除指令,将所述节点删除指令对应的节点确定为目标节点。
由于本申请实施方式的程序运行性能分析装置的各个功能模块与上述方法发明实施方式中相同,因此在此不再赘述。
在本申请的示例性实施例中,还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时使得处理器执行如上所述的各方法实施例的相应步骤。在一些可能的实施方式中,本申请的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当所述程序产品在终端设备上运行时,所述程序代码用于使所述终端设备执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。
参考图8所示,描述了根据本申请的实施方式的用于实现上述方法的程序产品800,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本申请的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
所述程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。
计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读信号介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。
可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。
可以以一种或多种程序设计语言的任意组合来编写用于执行本申请操作的程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。
在本申请的示例性实施例中,还提供了一种能够实现上述方法的电子设备。
所属技术领域的技术人员能够理解,本申请的各个方面可以实现为系统、方法或程序产品。因此,本申请的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“系统”。
下面参照图9来描述根据本申请的这种实施方式的电子设备900。图9显示的电子设备900仅仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。
如图9所示,电子设备900以通用计算设备的形式表现。电子设备900的组件可以包括但不限于:上述至少一个处理单元910、上述至少一个存储单元920、连接不同系统组件(包括存储单元920和处理单元910)的总线930、显示单元940。
其中,所述存储单元存储有程序代码,所述程序代码可以被所述处理单元910执行,使得所述处理单元910执行本说明书上述“示例性方法”部分中描述的根据本申请各种示例性实施方式的步骤。例如,所述处理单元910可以执行如图1中所示的步骤S12至步骤S16。
存储单元920可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)9201和/或高速缓存存储单元9202,还可以进一步包括只读存储单元(ROM)9203。
存储单元920还可以包括具有一组(至少一个)程序模块9205的程序/实用工具9204,这样的程序模块9205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。
总线930可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。
电子设备900也可以与一个或多个外部设备1000(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备900交互的设备通信,和/或与使得该电子设备900能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口950进行。并且,电子设备900还可以通过网络适配器960与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。如图所示,网络适配器960通过总线930与电子设备900的其它模块通信。应当明白,尽管图中未示出,可以结合电子设备900使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储系统等。
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、终端装置、或者网络设备等)执行根据本申请实施方式的方法。
此外,上述附图仅是根据本申请示例性实施例的方法所包括的处理的示意性说明,而不是限制目的。易于理解,上述附图所示的处理并不表明或限制这些处理的时间顺序。另外,也易于理解,这些处理可以是例如在多个模块中同步或异步执行的。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其他实施例。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限。

Claims (28)

  1. 一种节点处理方法,应用于influxdb集群,所述节点处理方法包括:
    获取集群各节点中每一数据槽的路由统计信息;
    根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
    根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
  2. 根据权利要求1所述的节点处理方法,其中,在将所述目标节点的数据槽转移到所述其余节点上之后,所述节点处理方法还包括:
    将所述目标节点从所述集群中删除。
  3. 根据权利要求1或2所述的节点处理方法,其中,每隔预定时间将所述集群中各数据槽的路由统计信息持久化到一配置文件中;其中,获取集群各节点中每一数据槽的路由统计信息包括:
    从所述配置文件中获取集群各节点中每一数据槽的路由统计信息。
  4. 根据权利要求1-3中任一项所述的节点处理方法,其中,所述路由压力为节点上所有数据槽在一预设时间段内的路由次数。
  5. 根据权利要求2或4所述的节点处理方法,其中,根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上包括:
    计算所述其余节点的路由压力的比例;
    根据所述比例将所述目标节点的数据槽转移到所述其余节点上。
  6. 根据权利要求5所述的节点处理方法,其中,根据所述比例将所述目标节点的数据槽转移到所述其余节点上包括:
    获取所述其余节点的权重;
    根据所述比例并结合所述其余节点的权重将所述目标节点的数据槽转移到所述其余节点上。
  7. 根据权利要求2所述的节点处理方法,其中,所述节点处理方法还包括:
    将所述集群中处理能力低于一预设标准的节点确定为目标节点;或者
    响应一节点删除指令,将所述节点删除指令对应的节点确定为目标节点。
  8. 一种节点处理装置,应用于influxdb集群,所述节点处理装置包括:
    路由信息获取模块,其被配置用于获取集群各节点中每一数据槽的路由统计信息;
    路由压力确定模块,其被配置用于根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
    数据槽转移模块,其被配置用于根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
  9. 根据权利要求8所述的节点处理装置,其中,所述节点处理装置还包括:
    节点删除模块,其被配置用于将所述目标节点从所述集群中删除。
  10. 根据权利要求8或9所述的节点处理装置,其中,每隔预定时间将所述集群中各数据槽的路由统计信息持久化到一配置文件中,其中,路由信息获取模块包括:
    路由信息获取单元,其被配置用于从所述配置文件中获取集群各节点中每一数据槽的路由统计信息。
  11. 根据权利要求8-10中任一项所述的节点处理装置,其中,路由压力为节点上所有数据槽在一预设时间段内的路由次数。
  12. 根据权利要求9或11所述的节点处理装置,其中,所述数据槽转移模块包括:
    比例计算单元,其被配置用于计算所述其余节点的路由压力的比例;
    数据槽转移单元,其被配置用于根据所述比例将所述目标节点的数据槽转移到所述其余节点上。
  13. 根据权利要求12所述的节点处理装置,其中,所述数据槽转移单元包括:
    权重获取子单元,其被配置用于获取所述其余节点的权重;
    数据槽转移子单元,其被配置用于根据所述比例并结合所述其余节点的权重将所述目标节点的数据槽转移到所述其余节点上。
  14. 根据权利要求9所述的节点处理装置,其中,所述节点处理装置还包括:
    第一目标节点确定模块,其被配置用于将所述集群中处理能力低于一预设标准的节点确定为目标节点;或者
    第二目标节点确定模块,其被配置用于响应一节点删除指令,将所述节点删除指令对应的节点确定为目标节点。
  15. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时使得处理器执行应用于influxdb集群的如下处理:
    获取集群各节点中每一数据槽的路由统计信息;
    根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
    根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时使得处理器还执行如下处理:
    在将所述目标节点的数据槽转移到所述其余节点上之后,将所述目标节点从所述集群中删除。
  17. 根据权利要求15或16所述的计算机可读存储介质,其中,每隔预定时间将所述集群中各数据槽的路由统计信息持久化到一配置文件中,其中,获取集群各节点中每一数据槽的路由统计信息包括:
    从所述配置文件中获取集群各节点中每一数据槽的路由统计信息。
  18. 根据权利要求15-17中任一项所述的计算机可读存储介质,其中,所述路由压力为节点上所有数据槽在一预设时间段内的路由次数。
  19. 根据权利要求16或18所述的计算机可读存储介质,其中,根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上包括:
    计算所述其余节点的路由压力的比例;
    根据所述比例将所述目标节点的数据槽转移到所述其余节点上。
  20. 根据权利要求19所述的计算机可读存储介质,其中,根据所述比例将所述目标节点的数据槽转移到所述其余节点上包括:
    获取所述其余节点的权重;
    根据所述比例并结合所述其余节点的权重将所述目标节点的数据槽转移到所述其余节点上。
  21. 根据权利要求16所述的计算机可读存储介质,其中,所述计算机程序被处理器执行时使得处理器还执行如下处理:
    将所述集群中处理能力低于一预设标准的节点确定为目标节点;或者
    响应一节点删除指令,将所述节点删除指令对应的节点确定为目标节点。
  22. 一种电子设备,包括:
    处理器;以及
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令而使得所述电子设备执行应用于influxdb集群的如下处理:
    获取集群各节点中每一数据槽的路由统计信息;
    根据所述每一数据槽的路由统计信息确定所述集群中除一目标节点外其余节点的路由压力;
    根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上。
  23. 根据权利要求22所述的电子设备,其中,所述处理器配置为经由执行所述可执行指令而使得所述电子设备还执行如下处理:
    在将所述目标节点的数据槽转移到所述其余节点上之后,将所述目标节点从所述集群中删除。
  24. 根据权利要求22或23所述的电子设备,其中,每隔预定时间将所述集群中各数据槽的路由统计信息持久化到一配置文件中,其中,获取集群各节点中每一数据槽的路由统计信息包括:
    从所述配置文件中获取集群各节点中每一数据槽的路由统计信息。
  25. 根据权利要求22-24中任一项所述的电子设备,其中,所述路由压力为节点上所有数据槽在一预设时间段内的路由次数。
  26. 根据权利要求23或25所述的电子设备,其中,根据所述其余节点的路由压力将所述目标节点的数据槽转移到所述其余节点上包括:
    计算所述其余节点的路由压力的比例;
    根据所述比例将所述目标节点的数据槽转移到所述其余节点上。
  27. 根据权利要求26所述的电子设备,其中,根据所述比例将所述目标节点的数据槽转移到所述其余节点上包括:
    获取所述其余节点的权重;
    根据所述比例并结合所述其余节点的权重将所述目标节点的数据槽转移到所述其余节点上。
  28. 根据权利要求23所述的电子设备,其中,所述处理器配置为经由执行所述可执行指令而使得所述电子设备还执行如下处理:
    将所述集群中处理能力低于一预设标准的节点确定为目标节点;或者
    响应一节点删除指令,将所述节点删除指令对应的节点确定为目标节点。
PCT/CN2018/101023 2018-06-05 2018-08-17 节点处理方法及装置、计算机可读存储介质和电子设备 WO2019232932A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810578276.6A CN108763577A (zh) 2018-06-05 2018-06-05 节点处理方法及装置、存储介质和电子设备
CN201810578276.6 2018-06-05

Publications (1)

Publication Number Publication Date
WO2019232932A1 true WO2019232932A1 (zh) 2019-12-12

Family

ID=64000312

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/101023 WO2019232932A1 (zh) 2018-06-05 2018-08-17 节点处理方法及装置、计算机可读存储介质和电子设备

Country Status (2)

Country Link
CN (1) CN108763577A (zh)
WO (1) WO2019232932A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016793A (zh) * 2020-07-15 2020-12-01 北京淇瑀信息科技有限公司 基于目标用户群的资源分配方法、装置及电子设备
CN113312329A (zh) * 2020-02-26 2021-08-27 阿里巴巴集团控股有限公司 数据文件的调度方法、装置及设备
CN113791827A (zh) * 2020-10-14 2021-12-14 北京京东振世信息技术有限公司 页面加载方法、业务处理方法、装置、存储介质与设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024554A1 (en) * 2011-07-22 2013-01-24 International Business Machines Corporation Enabling cluster scaling
CN103810265A (zh) * 2014-01-27 2014-05-21 南京邮电大学 基于WiMAX本地路由下的数据库优化方法
CN104684041A (zh) * 2015-02-06 2015-06-03 中国科学院上海微系统与信息技术研究所 一种支持大规模节点应用的实时无线传感网路由方法
CN105915630A (zh) * 2016-06-01 2016-08-31 东软集团股份有限公司 跨网络数据传输系统及负载均衡调度方法
CN106161610A (zh) * 2016-06-29 2016-11-23 华为技术有限公司 一种分布式存储的方法和系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130024554A1 (en) * 2011-07-22 2013-01-24 International Business Machines Corporation Enabling cluster scaling
CN103810265A (zh) * 2014-01-27 2014-05-21 南京邮电大学 基于WiMAX本地路由下的数据库优化方法
CN104684041A (zh) * 2015-02-06 2015-06-03 中国科学院上海微系统与信息技术研究所 一种支持大规模节点应用的实时无线传感网路由方法
CN105915630A (zh) * 2016-06-01 2016-08-31 东软集团股份有限公司 跨网络数据传输系统及负载均衡调度方法
CN106161610A (zh) * 2016-06-29 2016-11-23 华为技术有限公司 一种分布式存储的方法和系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312329A (zh) * 2020-02-26 2021-08-27 阿里巴巴集团控股有限公司 数据文件的调度方法、装置及设备
CN113312329B (zh) * 2020-02-26 2024-03-01 阿里巴巴集团控股有限公司 数据文件的调度方法、装置及设备
CN112016793A (zh) * 2020-07-15 2020-12-01 北京淇瑀信息科技有限公司 基于目标用户群的资源分配方法、装置及电子设备
CN112016793B (zh) * 2020-07-15 2024-04-26 北京淇瑀信息科技有限公司 基于目标用户群的资源分配方法、装置及电子设备
CN113791827A (zh) * 2020-10-14 2021-12-14 北京京东振世信息技术有限公司 页面加载方法、业务处理方法、装置、存储介质与设备
CN113791827B (zh) * 2020-10-14 2023-11-03 北京京东振世信息技术有限公司 页面加载方法、业务处理方法、装置、存储介质与设备

Also Published As

Publication number Publication date
CN108763577A (zh) 2018-11-06

Similar Documents

Publication Publication Date Title
KR102388893B1 (ko) 브리지 장치를 이용한 스토리지 인접 연산 제공 시스템 및 방법
CN110019004B (zh) 一种数据处理方法、装置及系统
WO2020211569A1 (zh) 一种数据记录的索引创建方法
WO2022143540A1 (zh) 区块链索引的存储方法、装置、计算机设备及介质
CN109857723B (zh) 基于可扩容数据库集群的动态数据迁移方法及相关设备
CN111309732B (zh) 数据处理方法、装置、介质和计算设备
WO2019232932A1 (zh) 节点处理方法及装置、计算机可读存储介质和电子设备
WO2023273544A1 (zh) 日志文件的存储方法、装置、设备和存储介质
WO2020052379A1 (zh) 分布式存储系统中处理对象的元数据的方法及装置
US11947842B2 (en) Method for writing data in append mode, device and storage medium
WO2019232980A1 (zh) 节点配置方法及装置、计算机可读存储介质和电子设备
WO2024041022A1 (zh) 数据库表变更方法、装置、设备和存储介质
WO2023179509A1 (zh) 数据访问装置、方法、可读介质和电子设备
CN111651424B (zh) 一种数据处理方法、装置、数据节点及存储介质
WO2021057127A1 (zh) 一种基于多条业务属性的数据存储方法、装置及设备
US20220215386A1 (en) Transaction management device, non-transitory computer-readable recording medium having stored therein transaction management program, and transaction management method
WO2021012795A1 (zh) 网络节点的调度方法、装置、电子设备和存储介质
CN110502187B (zh) 一种快照回滚方法及装置
WO2020024392A1 (zh) 节点处理方法及装置、存储介质和电子设备
WO2019120226A1 (zh) 数据访问预测方法和装置
US11093532B2 (en) Pre-allocating filesystem metadata within an object storage system
WO2023193528A1 (zh) 文件解压方法、装置、电子设备及计算机可读存储介质
US7627716B2 (en) Method, system, and program for an adaptor to read and write to system memory
CN113051244B (zh) 数据访问方法和装置、数据获取方法和装置
WO2021254162A1 (zh) 数据发送方法及装置、存储介质及电子设备

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: 18921513

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: 18921513

Country of ref document: EP

Kind code of ref document: A1