CN114637599A - Cloud resource management method and device, electronic equipment and readable storage medium - Google Patents

Cloud resource management method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114637599A
CN114637599A CN202210190448.9A CN202210190448A CN114637599A CN 114637599 A CN114637599 A CN 114637599A CN 202210190448 A CN202210190448 A CN 202210190448A CN 114637599 A CN114637599 A CN 114637599A
Authority
CN
China
Prior art keywords
resource
request
resource change
server
message
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
CN202210190448.9A
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210190448.9A priority Critical patent/CN114637599A/en
Publication of CN114637599A publication Critical patent/CN114637599A/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/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • 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
    • 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/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a cloud resource management method and device, an electronic device and a readable storage medium. The method comprises the following steps: acquiring a resource change request from a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by a second server; according to the resource parameters, executing processing on the resources corresponding to the resource names in the resource change request to obtain processing execution results; generating a resource change response according to the processing execution result; issuing the resource change response to a second message topic in the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is subscribed to by the first server.

Description

Cloud resource management method and device, electronic equipment and readable storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of communication, and in particular relates to a cloud resource management method and device, an electronic device and a readable storage medium.
Background
The edge cloud computing is a cloud computing platform constructed on edge basic equipment based on cloud computing and edge computing capabilities, and can form an end-to-end technical architecture of 'cloud edge end three-body cooperation' with central cloud equipment and an internet of things terminal.
In an existing cloud-edge integrated architecture, a control plane of kubernets is generally arranged on a central cloud side, and a kubernets side component kubbelet is reconstructed to achieve light weight of the side component, so that computing nodes on an edge cloud side are managed by a kubernets cluster on the central cloud side. However, in the native kubernets cluster, a list-watch mechanism of kubernets is used as a communication mechanism of the kubernets and a control plane, and after reconstruction, the communication mechanism of the kubernets and the control plane is modified into a websocket mechanism, so that the reliability of data transmission is low when the edge cloud side is in a weak network condition.
Therefore, it is necessary to provide a new cloud resource management method.
Disclosure of Invention
The embodiment of the disclosure provides a cloud resource management method, which can ensure reliable transmission of data under the condition that a first server is in a weak network.
According to a first aspect of the embodiments of the present disclosure, there is provided a cloud resource management method, applied to a second server, including:
acquiring a resource change request from a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server;
according to the resource parameters, executing processing on the resources corresponding to the resource names in the resource change request to obtain processing execution results;
generating a resource change response according to the processing execution result;
issuing the resource change response to the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
Optionally, the method further comprises:
acquiring scheduling information of a container group; the container group in the container group scheduling information carries a preset label;
and issuing the container group scheduling information to the micro message queue.
Optionally, the resource name includes at least: any one of a node, an event, a container group, and a lease.
According to a second aspect of the embodiments of the present disclosure, there is also provided a cloud resource management method applied to a first server, including:
sending a resource change request to a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed by a second server;
acquiring a resource change response from a second message subject of the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result;
wherein the second message topic is pre-subscribed to by the first server; and the resource change response is sent to the second message subject of the micro message queue after the second server acquires the resource change request from the micro message queue and performs processing on the resource corresponding to the resource name in the resource change request according to the resource parameter.
Optionally, the method further comprises:
acquiring and caching container group scheduling information from a third message topic of the micro message queue; the container group scheduling information is issued after being acquired by the second server;
and generating container group updating data according to the container group scheduling information.
Optionally, the resource name includes at least: any one of a node, an event, a container group, and a lease.
According to a third aspect of the embodiments of the present disclosure, there is also provided a cloud resource management apparatus, including:
the acquisition module is used for acquiring a resource change request from a first message topic of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server;
the processing module is used for executing processing on the resource corresponding to the resource name in the resource change request according to the resource parameter to obtain a processing execution result;
the generating module is used for generating a resource change response according to the processing execution result;
the publishing module is used for publishing the resource change response to a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
According to a fourth aspect of the embodiments of the present disclosure, there is also provided a cloud resource management device, including:
the sending module is used for sending a resource change request to a first message theme of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed by a second server;
the acquisition module is used for acquiring resource change response from the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result; wherein the second message topic is pre-subscribed to by the first server; and the resource change response is sent to the second message subject of the micro message queue after the second server acquires the resource change request from the micro message queue and performs processing on the resource corresponding to the resource name in the resource change request according to the resource parameter.
According to a fifth aspect of the embodiments of the present disclosure, there is also provided an electronic apparatus, including:
a processor and a memory for storing instructions for controlling the processor to perform a method according to any one of the first aspects of the present disclosure; alternatively, the instructions are for controlling the processor to perform a method according to any one of the second aspects of the present disclosure.
According to a sixth aspect of embodiments of the present disclosure, there is also provided a readable storage medium storing executable instructions that, when executed by a processor, perform the method according to any one of the first aspects of the present disclosure; alternatively, the executable instructions, when executed by a processor, perform the method of any of the second aspects of the present disclosure.
In one embodiment, the resource change request is obtained from a first message subject of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server; according to the resource parameters, executing processing on the resources corresponding to the resource names in the resource change request to obtain processing execution results; generating a resource change response according to the processing execution result; issuing the resource change response into a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server. Therefore, the acquisition of resource change information is realized through a mechanism of publishing-subscribing different message topics in the micro message queue, million connections can be supported, the traditional list-watch mechanism of k8s is replaced, the reliable data transmission of the first server under the condition of a weak network can be ensured, and the problem of large-scale access of mass equipment is solved.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a cloud-edge integration architecture diagram of an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a cloud resource management method according to a first embodiment of the disclosure;
fig. 3 is a schematic flow chart of node creation according to a first embodiment of the present disclosure;
fig. 4 is a schematic diagram illustrating a publishing flow of pod scheduling information according to a first embodiment of the present disclosure;
fig. 5 is a flowchart illustrating a cloud resource management method according to a second embodiment of the disclosure;
fig. 6 is a schematic diagram of a system to which the cloud resource management method of the embodiment of the present disclosure is applied;
FIG. 7 is a functional block diagram of a cloud resource management apparatus that may be used with embodiments of the present disclosure;
FIG. 8 is a functional block diagram of an electronic device that may be used to implement embodiments of the present disclosure
FIG. 9 is a functional block diagram of an electronic device that may be used to implement embodiments of the present disclosure;
FIG. 10 is a functional block diagram of an electronic device that may be used to implement embodiments of the present disclosure;
FIG. 11 is a functional block diagram of an electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the embodiment of the disclosure, the first server is a cloud computing server constructed on an edge foundation device based on cloud computing and edge computing capabilities, the second server is a central cloud server, and the first server, the second server and the internet of things terminal form an end-to-end technical architecture of "cloud edge three-body cooperation". As shown in fig. 1, in the present disclosure, a cloud product MQTT (Message queue Telemetry Transport protocol) module and a lightweight controller are added in the second server; in the first server, lightweight k8s compute nodes are added, and in the lightweight k8s compute nodes, lightweight kubelet and containers (containers) are provided. It can be seen that, in the framework of the embodiment of the present disclosure, there is no intrusive modification and configuration on the original k8s cluster, and the framework belongs to bypass adaptation, and can be completely seamlessly merged into the original k8s system.
Fig. 2 is a flowchart illustrating a cloud resource management method according to a first embodiment of the present disclosure, which may be implemented by the second server shown in fig. 1.
As shown in fig. 2, the cloud resource management method of this embodiment may include the following steps 2100 to 2400:
step 2100, obtaining a resource change request from a first message topic of a micro message queue; the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed to by the second server.
Wherein the resource name at least comprises: any one of a node (node), an event (event), a container group (pod), and a lease (lease). The resource change request may be, for example, a node creation request, a node update request, an event creation request, an event update request, a container group creation request, a container group update request, a container group deletion request, a lease update request, a lease creation request, which are not listed herein.
Step 2200, according to the resource parameter, executing the processing on the resource corresponding to the resource name in the resource change request to obtain a processing execution result.
Step 2300, generating a resource change response according to the processing execution result.
2400, issuing the resource change response to a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
In this embodiment, a cloud resource management method is described by taking a create node as an example. Specifically, as shown in fig. 3, the cloud controller in the second server (cloud) acquires a node creation request (lite/edge/nodes/(node 1)/create) through subscription, where the node creation request includes parameter information and a request identifier required for creating a node.
The cloud end controller calls an interface of a real APIserver through calling an interface of a client-go, and after a client-go command is executed, a returned execution result and a corresponding request identifier are issued to a message topic (topic) of MQTT, namely lite/ack/{ nondenamer }, so that a kubel subscribing the ack topic of the node can find a resource change response corresponding to the request identifier of the node to determine whether the execution is successful or whether the execution is overtime.
Similarly, for event, the operations of the three resources, pod and release, are similar to the above process, and are not described herein again.
Optionally, in an embodiment, the method of this embodiment may further include: obtaining container group (pod) scheduling information; the container group in the container group scheduling information carries a preset label; publishing the container group scheduling information to a third message topic of the micro message queue; the third message topic is pre-subscribed to by the first server.
As shown in fig. 4, when a pod changes, the second server (cloud) needs to issue pod scheduling information to the micro message queue through the cloud controller, so that the changed pod information can be sent to the first server, and which pods are put into the edge cloud computing node under operation can be controlled. Alternatively, a pod that can be dropped into an edge cloud computing node needs to carry a preset tag, which can be, for example, openyurt.
In the foregoing, the cloud resource management method according to the embodiment of the present disclosure has been described with reference to the accompanying drawings, in this embodiment, a resource change request is obtained from a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server; according to the resource parameters, executing processing on the resources corresponding to the resource names in the resource change request to obtain processing execution results; generating a resource change response according to the processing execution result; issuing the resource change response to a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server. Therefore, the acquisition of resource change information is realized through a mechanism of publishing-subscribing different message topics in the micro message queue, million connections can be supported, the traditional list-watch mechanism of k8s is replaced, the reliable data transmission of the first server under the condition of a weak network can be ensured, and the problem of large-scale access of mass equipment is solved.
Fig. 5 is a flowchart illustrating a cloud resource management method according to a second embodiment of the present disclosure, which may be implemented by the second server shown in fig. 1.
As shown in fig. 5, the cloud resource management method of this embodiment may include steps 5100 to 5200 of:
step 5100, sending a resource change request to a first message subject of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request.
Wherein the resource name includes at least: any one of a node (node), an event (event), a container group (pod), and a lease (lease). The resource change request may be, for example, a node creation request, a node update request, an event creation request, an event update request, a container group creation request, a container group update request, a container group deletion request, a lease update request, a lease creation request, which are not listed herein.
Step 5200, obtaining a resource change response from the second message topic of the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result.
Wherein the second message topic is pre-subscribed to by the first server; and the resource change response is issued to the second message subject of the micro message queue after the second server acquires the resource change request from the micro message queue and processes the resource corresponding to the resource name in the resource change request according to the resource parameter.
It should be noted that, in this embodiment, in the code logic of the kubel, a structure openyurt. clientset { } is newly created to implement a clientset. interface, and the communication between the kubel and the apiserver mainly involves several resources and operations, namely, a node, an event, a pod, and an ase. Therefore, only part of operations of event, release, node and pod need to be realized by a newly constructed structural body, and other methods are realized by using fake in client-go. After the interface part is realized again by using the MQTT client, the parameters of the kubel key code do not need to be modified, and the invasive modification is not carried out on the kubel key logic. Three clients in kubelet: HeartbotClient, Kubeclient, EventClient all use the NewSimpleClientset () method to initialize: the core logic is to assemble the information of MQTT, send the parameters needed by the Node creation to the MQTT browser (MQTT publisher) on the cloud through the MQTT, and finally call the interface of client-go to create the Node after the consumption by the cloud-end controller on the cloud.
As shown in fig. 6, taking the creation of a node as an example, kubelet may issue parameter information required for creating a node to a micro message queue.
Optionally, in an embodiment, the method further includes: acquiring and caching container group scheduling information from a third message topic of the micro message queue; the container group scheduling information is issued after being acquired by the second server; and generating container group updating data according to the container group scheduling information.
Generally, there are three ways to obtain container group (pod) scheduling information, as shown in fig. 7, one way is to obtain a static pod declaration file on a local file system; acquiring a pod declaration file on a network (web); and thirdly, acquiring the pod declaration file through the apiserver. The former two are what we often say static container group (static pod) way to create containers, the first is what we often use to install some system components needed before k8s cluster creation, and kubelet is responsible for declaration period management and not governed by k8 s. The third is the mainstream way for kubelet to obtain pod declaration documents, and these pods are all governed by the k8s schedule and controller. The pod files obtained by the three methods are collected into the corresponding channels in the PodConfig module. And judging whether the changed pod is created, updated or deleted through merge (merge) operation of the PodConfig module, and finally entering a syncLoop logic module in the kubel to execute the creation, update and deletion operations of the pod.
In this embodiment, considering that the mechanism of MQTT itself can ensure the reliability of data transmission in the weak network environment, therefore, on the basis of the existing method of kubelet obtaining pod scheduling information, a method of new sourcemqttfiele obtaining pod is added, as shown in fig. 8, a changed pod is obtained through MQTT protocol and cached to a local file, the processing method of the subsequent pod is similar to the new sourcefile principle, the change from (watch) to the local file is monitored and notified to the corresponding channel, merge operation is performed, and finally channel data of PodUpdate is generated, and the subsequent processing logic is not changed. The method has the advantages that if the cloud side network is normal, the change information of the pod can be continuously obtained through the MQTT protocol and cached to the local file, and the logic of the NewSourceMQTTFile can send the change information of the pod to the channel of the PodUpdate through the change of the watch local file, so that the next merge operation is carried out. Once the network is disconnected, the kubel can completely process local files cached by the MQTT in the same way as the local file system static pod is processed, so that the purposes of restarting the host, disconnecting the edge cloud network but normally starting the pod can be realized, and if the network is recovered, the normal processing logic of the edge cloud network is entered.
In the foregoing, the cloud resource management method according to the embodiment of the present disclosure has been described with reference to the accompanying drawings, in this embodiment, a resource change request is sent to a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed by a second server; acquiring a resource change response from the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result. Therefore, the acquisition of resource change information is realized through a mechanism of publishing-subscribing different message topics in the micro message queue, million connections can be supported, the traditional list-watch mechanism of k8s is replaced, the reliable data transmission of the first server under the condition of a weak network can be ensured, and the problem of large-scale access of mass equipment is solved.
< apparatus embodiment >
In this embodiment, a cloud resource management apparatus is further provided, and as shown in fig. 9, the cloud resource management apparatus 4000 may include: an obtaining module 4100, a processing module 4200, a generating module 4300 and a publishing module 4400.
The acquiring module 4100 is configured to acquire a resource change request from a first message topic of the micro message queue; the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed to by the second server.
A processing module 4200, configured to perform processing on the resource corresponding to the resource name in the resource change request according to the resource parameter, so as to obtain a processing execution result.
A generating module 4300, configured to generate a resource change response according to the processing execution result.
The issuing module 4400 is configured to issue the resource change response to the second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
Wherein the resource name at least comprises: any one of a node, an event, a container group, and a lease.
In one embodiment, the obtaining module 4100 is further configured to obtain container group scheduling information; the container group in the container group scheduling information carries a preset label; the issuing module 4400 is further configured to issue the container group scheduling information to a third message topic of the micro message queue; the third message topic is pre-subscribed to by the first server.
The cloud resource management apparatus of this embodiment may be configured to execute the technical solution of the first method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
In this embodiment, there is further provided a cloud resource management apparatus, as shown in fig. 10, the cloud resource management apparatus 5000 may include: a sending module 5100 and an acquisition module 5200.
The sending module 5100 is configured to send a resource change request to a first message topic of the micro message queue; the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed to by the second server.
An obtaining module 5200, configured to obtain, according to the request identifier, a resource change response from the second message topic in the micro message queue; the resource change response at least comprises the request identification and a processing execution result; wherein the second message topic is pre-subscribed to by the first server; and the resource change response is sent to the second message subject of the micro message queue after the second server acquires the resource change request from the micro message queue and performs processing on the resource corresponding to the resource name in the resource change request according to the resource parameter.
Wherein the resource name at least comprises: any one of a node, an event, a container group, and a lease.
In one embodiment, the obtaining module 5200 is further configured to obtain and cache container group scheduling information from a third message topic of the micro message queue; the container group scheduling information is issued after being acquired by the second server; the apparatus further includes an update module configured to generate container group update data according to the container group scheduling information.
The cloud resource management apparatus of this embodiment may be configured to execute the technical solution of the first method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
< apparatus embodiment >
In this embodiment, an electronic device is also provided, where the electronic device is an electronic device 6000 shown in fig. 11, and the electronic device includes:
a memory 6100 for storing executable commands.
A processor 6200 configured to perform a method described in any method embodiment of the present disclosure under control of executable commands stored in a memory 6100.
The implementation subject of the embodiment of the method executed in the electronic device may be a server or an electronic device.
< readable storage Medium embodiment >
The present embodiments provide a readable storage medium having stored therein an executable command, which when executed by a processor, performs the method described in any of the method embodiments of the present disclosure.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as punch cards or in-groove raised structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, 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/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.

Claims (10)

1. A cloud resource management method is applied to a second server and is characterized by comprising the following steps:
acquiring a resource change request from a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server;
according to the resource parameters, executing processing on the resources corresponding to the resource names in the resource change request to obtain processing execution results;
generating a resource change response according to the processing execution result;
issuing the resource change response into a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
2. The method of claim 1, further comprising:
acquiring scheduling information of a container group; the container group in the container group scheduling information carries a preset label;
publishing the container group scheduling information to a third message topic of the micro message queue; the third message topic is pre-subscribed to by the first server.
3. The method of claim 1, wherein the resource name comprises at least: any one of a node, an event, a container group, and a lease.
4. A cloud resource management method is applied to a first server and is characterized by comprising the following steps:
sending a resource change request to a first message topic of a micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed by a second server;
acquiring a resource change response from a second message subject of the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result;
wherein the second message topic is pre-subscribed to by the first server; and the resource change response is issued to the second message subject of the micro message queue after the second server acquires the resource change request from the first message subject of the micro message queue and processes the resource corresponding to the resource name in the resource change request according to the resource parameter.
5. The method of claim 4, further comprising:
acquiring and caching container group scheduling information from a third message topic of the micro message queue; the container group scheduling information is issued after being acquired by the second server;
and generating container group updating data according to the container group scheduling information.
6. The method of claim 4, wherein the resource name comprises at least: any one of a node, an event, a container group, and a lease.
7. A cloud resource management apparatus, comprising:
the acquisition module is used for acquiring a resource change request from a first message topic of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the resource change request is sent by the first server to the micro message queue; the first message topic is pre-subscribed by the second server;
the processing module is used for executing processing on the resource corresponding to the resource name in the resource change request according to the resource parameter to obtain a processing execution result;
the generating module is used for generating a resource change response according to the processing execution result;
the publishing module is used for publishing the resource change response to a second message topic of the micro message queue; the resource change response at least comprises the request identification and the processing execution result; the second message topic is pre-subscribed to by the first server.
8. A cloud resource management apparatus, comprising:
the sending module is used for sending a resource change request to a first message theme of the micro message queue; wherein, the resource change request at least comprises a resource name, a resource parameter and a request identifier; the request identification is used for uniquely identifying the resource change request; the first message topic is pre-subscribed by a second server;
the acquisition module is used for acquiring a resource change response from a second message theme of the micro message queue according to the request identifier; the resource change response at least comprises the request identification and a processing execution result;
wherein the second message topic is pre-subscribed to by the first server; and the resource change response is sent to the second message subject of the micro message queue after the second server acquires the resource change request from the micro message queue and processes the resource corresponding to the resource name in the resource change request according to the resource parameter.
9. An electronic device, comprising:
a processor and a memory for storing instructions for controlling the processor to perform a method according to any one of claims 1 to 3; alternatively, the instructions are for controlling the processor to perform a method according to any one of claims 4 to 6.
10. A readable storage medium storing executable instructions that, when executed by a processor, perform a method according to any one of claims 1 to 3; alternatively, the executable instructions when executed by a processor perform the method of any of claims 4 to 6.
CN202210190448.9A 2022-02-28 2022-02-28 Cloud resource management method and device, electronic equipment and readable storage medium Pending CN114637599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210190448.9A CN114637599A (en) 2022-02-28 2022-02-28 Cloud resource management method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210190448.9A CN114637599A (en) 2022-02-28 2022-02-28 Cloud resource management method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114637599A true CN114637599A (en) 2022-06-17

Family

ID=81947058

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210190448.9A Pending CN114637599A (en) 2022-02-28 2022-02-28 Cloud resource management method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114637599A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135156A (en) * 2023-08-31 2023-11-28 上海道客网络科技有限公司 Edge cluster nano-management method and system based on publish/subscribe message protocol

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117135156A (en) * 2023-08-31 2023-11-28 上海道客网络科技有限公司 Edge cluster nano-management method and system based on publish/subscribe message protocol
CN117135156B (en) * 2023-08-31 2024-03-26 上海道客网络科技有限公司 Edge cluster nano-tube method, system, computer readable storage medium and electronic equipment based on publish/subscribe message protocol

Similar Documents

Publication Publication Date Title
CN109815028B (en) System, method, apparatus and computer storage medium for data synchronization
CN109120678B (en) Method and apparatus for service hosting of distributed storage system
CN111866191B (en) Message event distribution method, distribution platform, system and server
CN108196915B (en) Code processing method and device based on application container engine and storage medium
CN111090423B (en) Webhook framework system and method for realizing active calling and event triggering
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN108932157B (en) Method, system, electronic device and readable medium for distributed processing of tasks
CN111600772B (en) Network distribution content detection processing device, method, system and electronic equipment
CN113742031A (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN113760324A (en) Method and device for constructing micro front-end application
CN114089974B (en) Cloud code development system, method, device, equipment and storage medium
CN109144785A (en) Method and apparatus for Backup Data
CN112346926A (en) Resource state monitoring method and device and electronic equipment
CN111782254A (en) Method, device, equipment and storage medium for upgrading object
CN114637599A (en) Cloud resource management method and device, electronic equipment and readable storage medium
CN110659330A (en) Data processing method, device and storage medium
CN110324384B (en) Data pushing method and device
CN111510480B (en) Request sending method and device and first server
CN111124291A (en) Data storage processing method and device of distributed storage system and electronic equipment
CN114327563A (en) Data synchronization method, device, system, storage medium and computer system
CN112559001B (en) Method and device for updating application
CN112099841A (en) Method and system for generating configuration file
US10419368B1 (en) Dynamic scaling of computing message architecture
CN113132447A (en) Reverse proxy method and system
CN110048991B (en) Method and device for realizing signal interaction reliability

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