CN113467956A - Node resource management method and device - Google Patents

Node resource management method and device Download PDF

Info

Publication number
CN113467956A
CN113467956A CN202110858090.8A CN202110858090A CN113467956A CN 113467956 A CN113467956 A CN 113467956A CN 202110858090 A CN202110858090 A CN 202110858090A CN 113467956 A CN113467956 A CN 113467956A
Authority
CN
China
Prior art keywords
node
service
platform
gas
feature
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110858090.8A
Other languages
Chinese (zh)
Inventor
文江
斯奇能
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110858090.8A priority Critical patent/CN113467956A/en
Publication of CN113467956A publication Critical patent/CN113467956A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a node resource management method and device. The method comprises the following steps: acquiring a first service characteristic of a service to be processed; determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; n, M are all positive integers; each service feature of the N service features corresponds to at least one node feature of the M node features, the first service feature comprises at least one service feature of the N service features, and the first node feature comprises a feature required by a node for processing the service to be processed; selecting at least one node with the first node characteristics from the plurality of nodes, and determining a target node from the at least one node; and sending the service to be processed to the target node for processing. By the method, the appropriate node can be matched according to the service characteristics of the service to be processed for processing the service to be processed, and the reasonable management of the node is realized.

Description

Node resource management method and device
Technical Field
The invention relates to the technical field of distributed nodes, in particular to a node resource management method and device.
Background
With the continuous development of big data technology, the computing resources required to be invested are larger and larger at present. Moreover, in the big data technology field, the amount of access data is not steadily increasing, but peaks and valleys occur under the influence of various factors (such as the influence of early and late peak periods on the traffic flow, the influence of double 11 activities on the sales volume, and the like). The distributed node technology can deal with huge data access amount to a certain extent, so that data processing pressure is shared on each node. However, many nodes in the distributed nodes are difficult to implement equalization management, for example, some nodes share excessive data processing pressure, for example, the load is increased instantaneously, which causes the pressure of the nodes to be excessive, and for another example, some nodes have smaller load, which causes resource waste. Therefore, node management in distributed node technology is crucial.
Disclosure of Invention
The application provides a node resource management method and device, which are used for reasonably managing nodes in distributed nodes.
In a first aspect, a node resource management method is provided. The method comprises the following steps: acquiring a first service characteristic of a service to be processed; determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; wherein N, M are all positive integers; each service feature of the N service features corresponds to at least one node feature of the M node features, the first service feature includes at least one service feature of the N service features, and the first node feature includes a feature required by a node for processing the service to be processed; selecting at least one node with the first node characteristic from the created plurality of nodes, and determining a target node from the at least one node, wherein the target node is a node which is currently in an operating state and/or has a node operating load smaller than a preset load; and sending the service to be processed to the target node for processing.
In one possible design, the method further includes: after the target node finishes the service to be processed, at least one of the following operations is executed:
recovering the target node; and/or the presence of a gas in the gas,
updating the service state of the service to be processed into a completion state; and/or the presence of a gas in the gas,
and updating the node state of the target node into an idle state.
In one possible design, determining a target node having the first node characteristic includes:
when at least one of the following conditions is met, a target node with the characteristics of the first node is newly built; wherein the conditions include:
a node with the first node characteristic does not exist in the node resource pool;
the node load of the node with the first node characteristic in the node resource pool is greater than the preset load;
the node state of a node with the first node characteristic in the node resource pool is in a non-running state;
wherein the node resource pool is used for storing the created nodes.
In one possible design, the first traffic feature includes computational traffic, and the first node feature to which the first traffic feature is mapped includes: the running speed of the processor is greater than the preset speed;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first node feature mapped by the first service feature includes: the IO rate is greater than a second preset rate and/or the transmission bandwidth is greater than a preset bandwidth;
and/or the presence of a gas in the gas,
the first service feature comprises a processor-to-memory service ratio, and the first node feature mapped by the first service feature comprises: the storage space of the memory is larger than the preset space;
and/or the presence of a gas in the gas,
the first service feature comprises whether the running same data service instance service exists currently or not, and the first node feature mapped by the first service feature comprises: the node affinity is greater than a threshold.
In one possible design, issuing the service to be processed to the target node for processing includes:
determining a first service platform type corresponding to the first node characteristic according to a second mapping relation between the node characteristic and the service platform type; the second mapping relation comprises a plurality of node characteristics and a service platform type corresponding to each node characteristic; the first node characteristic comprises at least one node characteristic in the second mapping relation; the first service platform type refers to a type of a platform for serving the target node;
determining that a service platform type is a first service platform of the first service platform type;
and issuing the service to be processed to the target node through the first service platform.
In one possible design, the first service feature includes a computing service, and the first service platform type to which the first service feature is mapped includes: the Kubernetes platform;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first service platform type mapped by the first service feature includes: a Hadoop yann platform or bare metal service platform;
and/or the presence of a gas in the gas,
the first service feature comprises processor and memory configuration service, and the first service platform type mapped by the first service feature comprises: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform;
and/or the presence of a gas in the gas,
the first service feature includes whether a currently-operated same-data service instance service exists, and the first service platform type mapped by the first service feature includes: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform.
In a second aspect, a node resource management method is further provided, including:
the service management module is used for acquiring a first service characteristic of a service to be processed;
the service processing module is used for determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; wherein N, M are all positive integers; each service feature of the N service features corresponds to at least one node feature of the M node features, the first service feature includes at least one service feature of the N service features, and the first node feature includes a feature required by a node for processing the service to be processed;
the service processing module is further configured to select at least one node with the first node characteristic from the created plurality of nodes, and determine a target node from the at least one node, where the target node is a node in an operating state currently and/or a node operating load is smaller than a preset load;
the service processing module is further configured to issue the service to be processed to the target node for processing.
In one possible design, the traffic processing module is further configured to: after the target node finishes the service to be processed, at least one of the following operations is executed:
recovering the target node; and/or the presence of a gas in the gas,
updating the service state of the service to be processed into a completion state; and/or the presence of a gas in the gas,
and updating the node state of the target node into an idle state.
In one possible design, the service processing module is specifically configured to: when at least one of the following conditions is met, a target node with the characteristics of the first node is newly built; wherein the conditions include:
a node with the first node characteristic does not exist in the node resource pool;
the node load of the node with the first node characteristic in the node resource pool is greater than the preset load;
the node state of a node with the first node characteristic in the node resource pool is in a non-running state;
wherein the node resource pool is used for storing the created nodes.
In one possible design, the first traffic feature includes computational traffic, and the first node feature to which the first traffic feature is mapped includes: the running speed of the processor is greater than the preset speed;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first node feature mapped by the first service feature includes: the IO rate is greater than a second preset rate and/or the transmission bandwidth is greater than a preset bandwidth;
and/or the presence of a gas in the gas,
the first service feature comprises a processor-to-memory service ratio, and the first node feature mapped by the first service feature comprises: the storage space of the memory is larger than the preset space;
and/or the presence of a gas in the gas,
the first service feature comprises whether the running same data service instance service exists currently or not, and the first node feature mapped by the first service feature comprises: the node affinity is greater than a threshold.
In one possible design, the service processing module is specifically configured to:
determining a first service platform type corresponding to the first node characteristic according to a second mapping relation between the node characteristic and the service platform type; the second mapping relation comprises a plurality of node characteristics and a service platform type corresponding to each node characteristic; the first node characteristic comprises at least one node characteristic in the second mapping relation; the first service platform type refers to a type of a platform for serving the target node;
determining that a service platform type is a first service platform of the first service platform type;
and issuing the service to be processed to the target node through the first service platform.
In one possible design, the first service feature includes a computing service, and the first service platform type to which the first service feature is mapped includes: the Kubernetes platform;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first service platform type mapped by the first service feature includes: a Hadoop yann platform or bare metal service platform;
and/or the presence of a gas in the gas,
the first service feature comprises processor and memory configuration service, and the first service platform type mapped by the first service feature comprises: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform;
and/or the presence of a gas in the gas,
the first service feature includes whether a currently-operated same-data service instance service exists, and the first service platform type mapped by the first service feature includes: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform.
In a third aspect, a master node server is provided, where the master node server is configured to connect a client and a node resource pool, and the node resource pool is configured to store created nodes; the client is used for issuing a service to be processed to the master node server;
the master node server includes:
a memory for storing program instructions;
a processor for calling the program instructions stored in said memory and for executing the method steps as provided in the first aspect above in accordance with the obtained program instructions.
In a fourth aspect, a server system is provided, where the server system includes a node resource pool, and the master node server provided in the third aspect.
In a fifth aspect, a node resource management system is provided, including:
the client is used for providing the service to be processed;
and a server system as provided in the fourth aspect above.
In a sixth aspect, there is provided a computer readable storage medium storing a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method steps as provided in the first aspect above.
In a seventh aspect, a computer program product comprising instructions is provided, which, when run on a computer, causes the computer to perform the method steps as provided in the first aspect above.
The method comprises the steps of obtaining a first service characteristic of a service to be processed; determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the service characteristic and the node characteristic; the first node characteristics comprise characteristics required by a node for processing the service to be processed; determining a target node with the first node characteristic; and sending the service to be processed to the target node. By the method, the appropriate node can be matched according to the service characteristics of the service to be processed for processing the service to be processed, the reasonable management of the node is realized, and the impact on the service in operation can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application.
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a node resource management method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a server system provided in an embodiment of the present application;
FIG. 4 is a diagram of another example of a server system provided by an embodiment of the present application;
fig. 5 is a schematic diagram of a node resource management device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The "plurality" in the present application may mean at least two, for example, two, three or more, and the embodiments of the present application are not limited.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in this document generally indicates that the preceding and following related objects are in an "or" relationship unless otherwise specified.
The technical scheme provided by the embodiment of the application is described in the following with the accompanying drawings of the specification.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario provided in the present application. The application scenario includes a node resource management system, and the node resource management system includes a client and a server (or referred to as a server system). The server system includes: the system comprises at least one main node server, at least one data service platform and at least one node resource pool. The main node server can issue services to each data service platform, and the data service platforms search for corresponding available nodes in the node resource pool according to the information of the services and then return to the main node server for recording. For example, the master node server issues the service 1, and the data service platform acquires the available node 1 from the node resource pool, so as to process the service 1. The data service platform returns the available node 1 to the master node server to record that the available node 1 is used to complete the service 1. Alternatively, the data service platform may not be configured (so that the dotted line is used in fig. 1), and the master node server may directly find the corresponding available node in the node resource pool.
Fig. 2 is a flowchart illustrating a node resource management method according to an embodiment of the present application. The method may be applied to a server system (e.g., the server in fig. 1). The flow chart of the method shown in fig. 2 is described as follows:
step 201: the method comprises the steps of obtaining a first service characteristic of a service to be processed.
Before step 201, the method may further include the steps of: and acquiring the service to be processed. Illustratively, the pending traffic may be obtained from a client (e.g., fig. 1). For example, the step of acquiring the pending service may be performed by a master node server of the server system in fig. 1. That is, the master node server is connected to the client and may be configured to obtain the pending service of the client.
After the to-be-processed service is acquired, the first service characteristic of the to-be-processed service can be determined to be acquired. Wherein the first service feature comprises: at least one of a computing type service, an input/output (IO) type service, a processor and memory matching service and whether the same data service instance service which is already operated exists currently. The computing services may include services requiring complex computation, such as protocol parsing, data format conversion, computation statistics, and the like. The input/output IO type service may include a service that requires frequent accesses to IO such as a disk or a network. Processor and storage orchestration traffic may include traffic that is more heavily occupied with memory and storage than general traffic, such as traffic tailored to a specific traffic scenario (e.g., traffic with larger time window statistics). Whether there is currently an already running same data service instance service may include accessing data from multiple services from the same data service instance, e.g., HDFS.
For example, please refer to fig. 3, which is a schematic diagram of a server system. Step 201 may be performed by a master node server in a server system. For example, the primary node server includes a service management module TaskManager. The TaskManager is used for acquiring the service to be processed from the client. For example, the client submits the pending service to the service management module TaskManager. For example, the client may submit the service to be processed to the service management module TaskManager through an interface having an architecture style of web service; alternatively, the client may choose to submit the pending traffic to the TaskManger through a Representational State Transfer (REST) style interface. The task manager can also analyze the service to be processed to obtain the first service characteristic of the service to be processed.
Step 202: determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; wherein N, M are all positive integers; each of the N service features corresponds to at least one of the M node features, the first service feature includes at least one of the N service features, and the first node feature includes a feature that a node for processing the service to be processed needs to have. M ═ N is mainly used as an example herein.
Illustratively, the first mapping relationship is as follows:
TABLE 1
Figure BDA0003184831400000091
For example, assuming that a first service feature of a service to be processed is a computer-type service, a first node feature mapped by the first service feature includes: the processor running speed is greater than the preset speed, so a target node with the processor running speed greater than the preset speed needs to be searched for processing the service to be processed, and the calculation pressure is relieved.
For another example, assuming that a first service feature of a service to be processed is an input/output (IO) type service, a first node feature mapped by the first service feature includes: the IO rate is greater than the second preset rate and/or the transmission bandwidth is greater than the preset bandwidth, so a target node whose IO rate is greater than the second preset rate and/or the transmission bandwidth is greater than the preset bandwidth needs to be searched to process the service to be processed. Wherein, the transmission bandwidth may be a SSD configured transmission bandwidth.
Illustratively, with continuing reference to FIG. 3, step 202 may be performed by the home node server in the server system, such as by a TaskManager or WorkerManager in the home node server.
Step 203, selecting at least one node with the first node characteristic from the created plurality of nodes, and determining a target node from the at least one node, wherein the target node is a node which is currently in an operating state and/or has a node operating load smaller than a preset load.
For example, when a target node is determined in a node resource pool (as shown in fig. 1) for storing created nodes, there are several cases, which are described separately below.
Situation one
The node resource pool includes one node having the first node characteristic, that is, only one node having the first node characteristic is included in the node resource pool. In this case, it can be directly determined that the node is the target node; or determining that the node load of the node is smaller than the preset load, and/or determining that the node is the target node when the node state of the node is determined to be in the running state, otherwise, using the method of the third case.
Situation two
In this case, the target node may be selected from the plurality of nodes. For example, the target node may be randomly selected, or designated by a user, or determined among the plurality of nodes according to node loads and/or node states of the nodes; wherein the node load of the target node is less than a threshold and/or the node status is in a running state.
For example, the nodes with the first service characteristics screened from the node resource pool include node 1, node 2 and node 3, and the node states of the three nodes all enter the working state; and the WorkerManager selects an available node which is most suitable for completing the service according to the node loads of the three nodes. Assuming that the node load of the selected node 1 is less than the preset load, the node 1 is the target node. Wherein the node load of the node 1 being less than the preset load includes the node load of the node 1 being less than the load of the node 2 and less than the load of the node 3.
Situation three
No node having the first node characteristic is present in the node resource pool. In this case, a new target node having the first node characteristics may be created. And the related information can be recorded for the newly-built node. Such as the node status (running status or idle status, etc.) of the newly created node, for ease of management.
The above-described cases one to three may be used in combination. For example, case one and case three are combined. Illustratively, a node with the first node characteristic exists in the node resource pool, but the node load is greater than a preset load, and then a target node with the first node characteristic is newly established. For another example, if there is a node with the first node characteristic in the node resource pool, but the node state of the node is in a non-running state, a new target node with the first node characteristic is created.
For example, please continue to refer to fig. 3. The main node server in the server system comprises a business processing module WorkerManager. And the WorkerManager is used for selecting a corresponding target node in the node resource pool according to the first service characteristic. And if the corresponding target node is not found in the node resource pool, a node is newly built, and the information of the newly built node is returned to the TaskManager record.
Optionally, with continued reference to fig. 3, the master node server (e.g., WorkerManager) may further maintain information of the node, where the information of the node includes: node status, node load, etc. The WorkerManager can interface each data service platform through the resource management module ResManager. The data service platform may be a platform as a service/software as a service (PAAS/IAAS) platform server. The data platform server includes, but is not limited to, kubernets, Hadoop yann, Open stack, and other platforms. The ResManager is used for creating or destroying the nodes corresponding to the data server platforms, receiving the physical state events of the nodes, and the like. Wherein, the physical state of the node includes but is not limited to events such as abnormal exit of the node when the resource is unavailable; the receiving mode includes, but is not limited to, the RestFul style watch interface, message queue middleware subscription, rotation training, and the like. The ResManager exposes a uniform interface to callers such as WorkerManager, and the like, and the interface comprises node creation, destruction and the like.
The WorkerManager receives the events of the platforms about the nodes, completes the creation and destruction of the nodes through the interfaces or the libraries of the platforms, simultaneously maintains the node state according to the service communication such as node login and heartbeat, and informs the TaskManager when the node state is changed. When the master node server is started, the master node determines, according to modes including but not limited to an environment variable, or a configuration file, or an update interface, whether the enabling or disabling state of each platform in the PAAS/IAAS platform server docked by the ResManager, and/or the authority parameters of each platform, and/or the time interval of newly building or destroying the node, and/or the relevant configuration such as the online and offline of the number of the nodes, is selected to update the service state and the node state. The service state is used for indicating the progress of the service, and the node state is used for indicating the state of the node. And in the running process of the WorkerManager module, the initialization and the registration of each platform in the PAAS/IAAS platform server docked by the ResManager are completed according to the configuration file of the main node.
And 204, sending the service to be processed to the target node for processing.
Optionally, step 204 may be subdivided into: determining a first service platform type corresponding to the first node characteristic according to a second mapping relation between the node characteristic and the service platform type; the second mapping relation comprises a plurality of node characteristics and a service platform type corresponding to each node characteristic; the first node characteristic is one of a plurality of node characteristics in the second mapping relation; the first service platform type refers to a type of a platform for serving the target node; determining that a service platform type is a first service platform of the first service platform type; and issuing the service to be processed to the target node through the first service platform.
In embodiments of the present application, nodes having different node characteristics interface with different types of service platforms. For example, in fig. 3, the AAS/IAAS platform includes kubernets, Hadoop yarn, Open stack, and the like, and may further include bare metal service platforms, and different types of service platforms have specific advantages, for example, the sensitivity of the kubernets platform is better, the resources consumed by the bare metal service platforms are less, and the like.
After determining the first node characteristic and the target node having the first node characteristic, a first service platform type for serving the target node may be determined according to a second mapping relationship. Illustratively, the second mapping relationship is as follows table 2:
TABLE 2
Figure BDA0003184831400000131
For example, assuming that the first node characteristic is the computing service in table 2, the corresponding first service platform type is a kubernets platform, that is, the service to be processed is delivered to the target node through the kubernets platform.
For another example, assuming that the first node feature is the IO type service in table 2, the corresponding first service platform type may be a bare metal service platform, that is, the bare metal service platform issues the service to be processed to the target node.
Optionally, after the target node completes the service to be processed, at least one of the following operations may be further performed:
recovering the target node; and/or the presence of a gas in the gas,
updating the service state of the service to be processed into a completion state; and/or the presence of a gas in the gas,
and updating the node state of the target node into an idle state.
Taking recycling the target node as an example, the recycling available node may be understood as a destruction node, that is, the node does not exist, which is beneficial to saving node resources.
Taking the case of updating the service state of the to-be-processed service as the completion state, when the to-be-processed service is not completed, the service state of the to-be-processed service is in processing, and when the to-be-processed service is completed, the service state of the to-be-processed service is completed. Therefore, the management and control of the processing progress of different services can be facilitated.
Taking the node state of the target node as an idle state for example, when the target node does not process any service, the target node is in the idle state, and when the target node is processing the service, the target node is in the running state. Thus, in this way, the state of the target node can be adjusted to facilitate use by other services.
Illustratively, step 204 may be performed by the master node server. Such as by WorkerManager. And when the main node server determines a target node in the node resource pool, the main node server sends the service to be processed to the target node. When the target node does not exist in the node resource pool, the TaskManager can newly establish a node as the target node. And the newly-built node needs to carry a unique identifier and is injected into the new node in the modes of environment variables, file writing and the like. When the new node performs online action, the new node needs to log in with a unique identifier to complete association between entity nodes such As Platform As A Service (PAAS), Infrastructure As A Service (IAAS) and Service virtual nodes, so As to facilitate the abnormal matching of abnormal diagnosis in node events reported by ResManager. In this way, when there is no target node in the node resource pool, the lateral expansion of the node resource pool (i.e., adding one or more nodes) is triggered. It can be understood that, when a node is newly built in the node resource pool, a data service platform for interfacing with the newly built node may be added in the data service platform, that is, the data service platform may be laterally expanded. For example, a kubernets platform is added to interface with the new nodes. Optionally, when performing horizontal capacity expansion of the data service platform, capacity expansion may be performed according to the service features. For example, a Kubernetes platform with stronger agility can be added for single service; for services with high bandwidth requirements, a bare metal service platform can be added to avoid the consumption of Virtual eXtensible Local Area Network (VXLAN) resources in a container management system (kubernets, K8s) platform.
Illustratively, with continued reference to fig. 3, the server system further includes a service communication module WorkerRPCServer, where the WorkerRPCServer is configured to complete service delivery of the TaskManager to the node.
In the foregoing embodiment, the service management and distribution are handled by the TaskManager, and the TaskManager needs to change the service state and the node state and access the TaskManager internally to acquire an available node for the service to be distributed to issue. The service change and the routing information distribution can be persisted in data services with data persistence capability, such as but not limited to database systems mySQL, a master node etcd, and the like. Illustratively, for the change of the state service, the user side actively modifies the service, and needs to inform the working node which is performing the service to terminate the current service and update the service; and the working node measures the progress state of the updated service and needs to persist the corresponding data for the user to inquire. For the change of the node state, when the node is unavailable in an offline mode, the service needs to be recovered and the service needs to be issued to other available nodes again; when the node is available on line, whether to distribute new service to the node can be calculated according to load balance; wherein the node load may be any one of a traffic computation amount or a load of a node in operation.
Fig. 4 is an example provided by an embodiment of the present application. As shown in fig. 4, the server system includes:
the client 401 is configured to connect to the service management module TaskManager 402.
The service management module TaskManager402 is configured to obtain a service to be processed from the client 401 and analyze the service to be processed to determine a first service characteristic of the service to be processed.
The service processing module WorkerManager403 is configured to screen a target node from the node resource pool 405 according to the first service characteristic analyzed in the service management module TaskManager402, and return the target node to the service management module TaskManager402 for recording. The service processing module WorkerManager403 is further configured to, in a case where the target node is not screened out from the node resource pool, create a new node and return information of the created node to the service management module TaskManager402 for recording. After receiving the information of the new node, the service management module TaskManager402 issues the service to be processed to the new node.
A resource management module ResManager404, configured to interface platform as a service/software as a service (PAAS/IAAS) platform servers, where the platform servers include, but are not limited to, platforms such as K8s, Hadoop yard, Open stack, and the like; for interfacing the node resource pool 405, and for managing the expansion and contraction actions of the node completed by the working node.
The node resource pool 405 is configured to store various nodes to complete the service issued by the service management module TaskManager 402.
Based on the same inventive concept, the embodiment of the application provides a node resource management device. The apparatus may be the master node server as hereinbefore described. Referring to fig. 5, the electronic device includes at least one processor 501 and a memory 502 connected to the at least one processor, in this embodiment, a specific connection medium between the processor 501 and the memory 502 is not limited in this application, in fig. 5, the processor 501 and the memory 502 are connected through a bus 500 as an example, the bus 500 is represented by a thick line in fig. 5, and connection manners between other components are only schematically illustrated and not limited. The bus 500 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 5 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 may execute the steps included in the foregoing node resource management method by executing the instructions stored in the memory 502.
The processor 501 is a control center of the electronic device, and may connect various parts of the whole electronic device by using various interfaces and lines, and perform various functions and process data of the electronic device by operating or executing instructions stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring on the electronic device. Optionally, the processor 501 may include one or more processing units, and the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, application programs, and the like, and the modem processor mainly handles wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 501 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the node resource management method disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 502, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 502 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 502 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 502 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
By programming the processor 501, the code corresponding to the node resource management method described in the foregoing embodiment may be solidified in the chip, so that the chip can execute the steps of the node resource management method when running, and how to program the processor 501 is a technique known by those skilled in the art, and is not described here again.
Based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium storing computer instructions, which, when executed on a computer, cause the computer to perform the steps of the node resource management method as described above.
In some possible embodiments, the aspects of the node resource management method provided in this application may also be implemented in the form of a program product, which includes program code for causing a detection device to perform the steps in the node resource management method according to various exemplary embodiments of this application described above in this specification, when the program product is run on an electronic device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (16)

1. A node resource management method is characterized by comprising the following steps:
acquiring a first service characteristic related to a service to be processed;
determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; wherein N, M are all positive integers; each service feature of the N service features corresponds to at least one node feature of the M node features, the first service feature includes at least one service feature of the N service features, and the first node feature includes a feature required by a node for processing the service to be processed;
selecting at least one node with the first node characteristic from the created plurality of nodes, and determining a target node from the at least one node, wherein the target node is a node which is currently in an operating state and/or has a node operating load smaller than a preset load;
and sending the service to be processed to the target node for processing.
2. The method of claim 1, further comprising:
after the target node finishes the service to be processed, at least one of the following operations is executed:
recovering the target node; and/or the presence of a gas in the gas,
updating the service state of the service to be processed into a completion state; and/or the presence of a gas in the gas,
and updating the node state of the target node into an idle state.
3. The method of claim 1, further comprising:
when at least one of the following conditions is met, a target node with the characteristics of the first node is newly built; wherein the conditions include:
a node with the first node characteristic does not exist in the node resource pool;
the node load of the node with the first node characteristic in the node resource pool is greater than the preset load;
the node state of a node with the first node characteristic in the node resource pool is in a non-running state;
wherein the node resource pool is used for storing the created nodes.
4. The method of claim 1,
the first traffic feature comprises computational traffic, and the first node feature to which the first traffic feature is mapped comprises: the running speed of the processor is greater than a first preset speed;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first node feature mapped by the first service feature includes: the IO rate is greater than a second preset rate and/or the transmission bandwidth is greater than a preset bandwidth;
and/or the presence of a gas in the gas,
the first service feature comprises a processor-to-memory matching service, and the first node feature mapped by the first service feature comprises: the storage space of the memory and/or the memorizer is larger than the preset space;
and/or the presence of a gas in the gas,
the first service feature comprises whether the running same data service instance service exists currently or not, and the first node feature mapped by the first service feature comprises: the node affinity is greater than a threshold.
5. The method of claim 1, wherein issuing the service to be processed to the target node for processing comprises:
determining a first service platform type corresponding to the first node characteristic according to a second mapping relation between the node characteristic and the service platform type; the second mapping relation comprises a plurality of node characteristics and a service platform type corresponding to each node characteristic; the first node characteristic comprises at least one node characteristic in the second mapping relation; the first service platform type refers to a type of a platform for serving the target node;
determining that a service platform type is a first service platform of the first service platform type;
and issuing the service to be processed to the target node through the first service platform.
6. The method of claim 5,
the first service feature comprises a computing service, and the first service platform type mapped by the first service feature comprises: the Kubernetes platform;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first service platform type mapped by the first service feature includes: a Hadoop yann platform or bare metal service platform;
and/or the presence of a gas in the gas,
the first service feature comprises processor and memory configuration service, and the first service platform type mapped by the first service feature comprises: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform;
and/or the presence of a gas in the gas,
the first service feature includes whether a currently-operated same-data service instance service exists, and the first service platform type mapped by the first service feature includes: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform.
7. A node resource management apparatus, comprising:
the service management module is used for acquiring a first service characteristic of a service to be processed;
the service processing module is used for determining a first node characteristic mapped by the first service characteristic according to a first mapping relation between the N service characteristics and the M node characteristics; wherein N, M are all positive integers; each of the N service features corresponds to at least one of the M node features, the first service feature includes at least one of the N service features, and the first node feature includes a feature required by a node for processing the service to be processed
The service processing module is further configured to select at least one node with the first node characteristic from the created plurality of nodes, and determine a target node from the at least one node, where the target node is a node in an operating state currently and/or a node operating load is smaller than a preset load;
the service processing module is further configured to issue the service to be processed to the target node for processing.
8. The apparatus of claim 7, wherein the traffic processing module is further configured to:
after the target node finishes the service to be processed, at least one of the following operations is executed:
recovering the target node; and/or the presence of a gas in the gas,
updating the service state of the service to be processed into a completion state; and/or the presence of a gas in the gas,
and updating the node state of the target node into an idle state.
9. The apparatus according to claim 7, wherein the service processing module is specifically configured to:
when at least one of the following conditions is met, a target node with the characteristics of the first node is newly built; wherein the conditions include:
a node with the first node characteristic does not exist in the node resource pool;
the node load of the node with the first node characteristic in the node resource pool is greater than the preset load;
the node state of a node with the first node characteristic in the node resource pool is in a non-running state;
wherein the node resource pool is used for storing the created nodes.
10. The apparatus of claim 7,
the first traffic feature comprises computational traffic, and the first node feature to which the first traffic feature is mapped comprises: the running speed of the processor is greater than the preset speed;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first node feature mapped by the first service feature includes: the IO rate is greater than a second preset rate and/or the transmission bandwidth is greater than a preset bandwidth;
and/or the presence of a gas in the gas,
the first service feature comprises a processor-to-memory service ratio, and the first node feature mapped by the first service feature comprises: the storage space of the memory is larger than the preset space;
and/or the presence of a gas in the gas,
the first service feature comprises whether the running same data service instance service exists currently or not, and the first node feature mapped by the first service feature comprises: the node affinity is greater than a threshold.
11. The apparatus according to claim 7, wherein the service processing module is specifically configured to:
determining a first service platform type corresponding to the first node characteristic according to a second mapping relation between the node characteristic and the service platform type; the second mapping relation comprises a plurality of node characteristics and a service platform type corresponding to each node characteristic; the first node characteristic comprises at least one node characteristic in the second mapping relation; the first service platform type refers to a type of a platform for serving the target node;
determining that a service platform type is a first service platform of the first service platform type;
and issuing the service to be processed to the target node through the first service platform.
12. The apparatus of claim 11,
the first service feature comprises a computing service, and the first service platform type mapped by the first service feature comprises: the Kubernetes platform;
and/or the presence of a gas in the gas,
the first service feature includes an input/output (IO) type service, and the first service platform type mapped by the first service feature includes: a Hadoop yann platform or bare metal service platform;
and/or the presence of a gas in the gas,
the first service feature comprises processor and memory configuration service, and the first service platform type mapped by the first service feature comprises: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform;
and/or the presence of a gas in the gas,
the first service feature includes whether a currently-operated same-data service instance service exists, and the first service platform type mapped by the first service feature includes: a Kubernetes platform, a Hadoop grow platform, or an Open stack platform.
13. A master node server, characterized in that,
the master node server is used for connecting the client and a node resource pool, and the node resource pool is used for storing the created nodes; the client is used for issuing a service to be processed to the master node server;
the master node server includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps comprised by the method of any one of claims 1 to 6 in accordance with the obtained program instructions.
14. A server system, characterized in that,
the server system comprising a pool of node resources, and the master node server of claim 13.
15. A node resource management system, comprising:
the client is used for providing the service to be processed;
and a server system as claimed in claim 14.
16. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-6.
CN202110858090.8A 2021-07-28 2021-07-28 Node resource management method and device Pending CN113467956A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110858090.8A CN113467956A (en) 2021-07-28 2021-07-28 Node resource management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110858090.8A CN113467956A (en) 2021-07-28 2021-07-28 Node resource management method and device

Publications (1)

Publication Number Publication Date
CN113467956A true CN113467956A (en) 2021-10-01

Family

ID=77882932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110858090.8A Pending CN113467956A (en) 2021-07-28 2021-07-28 Node resource management method and device

Country Status (1)

Country Link
CN (1) CN113467956A (en)

Similar Documents

Publication Publication Date Title
CN109783237B (en) Resource allocation method and device
CN107968810B (en) Resource scheduling method, device and system for server cluster
CN105049268A (en) Distributed computing resource allocation system and task processing method
CN103019853A (en) Method and device for dispatching job task
US10158709B1 (en) Identifying data store requests for asynchronous processing
CN110784498B (en) Personalized data disaster tolerance method and device
US10182104B1 (en) Automatic propagation of resource attributes in a provider network according to propagation criteria
CN112269661B (en) Partition migration method and device based on Kafka cluster
CN115392501A (en) Data acquisition method and device, electronic equipment and storage medium
CN111177237B (en) Data processing system, method and device
CN110321364B (en) Transaction data query method, device and terminal of credit card management system
CN110096339B (en) System load-based capacity expansion and contraction configuration recommendation system and method
US7925755B2 (en) Peer to peer resource negotiation and coordination to satisfy a service level objective
CN114528104A (en) Task processing method and device
CN108696559B (en) Stream processing method and device
CN116069493A (en) Data processing method, device, equipment and readable storage medium
CN116089477B (en) Distributed training method and system
CN111427887A (en) Method, device and system for rapidly scanning HBase partition table
CN111736975A (en) Request control method and device, computer equipment and computer readable storage medium
CN113467956A (en) Node resource management method and device
CN103019813A (en) Method for obtaining interactive strength of SaaS-based interactive program
CN114860460A (en) Database acceleration method and device and computer equipment
CN113886032A (en) Event scheduling method and device, electronic equipment and storage medium
EP3602309A1 (en) A memory allocation manager and method performed thereby for managing memory allocation
CN111641874A (en) Distributed computing method, system and readable storage medium

Legal Events

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