[go: up one dir, main page]

CN112445623A - Multi-cluster management method and device, electronic equipment and storage medium - Google Patents

Multi-cluster management method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112445623A
CN112445623A CN202011468375.2A CN202011468375A CN112445623A CN 112445623 A CN112445623 A CN 112445623A CN 202011468375 A CN202011468375 A CN 202011468375A CN 112445623 A CN112445623 A CN 112445623A
Authority
CN
China
Prior art keywords
service request
cluster
service
fragments
load balancer
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.)
Withdrawn
Application number
CN202011468375.2A
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.)
China Merchants Finance Technology Co Ltd
Original Assignee
China Merchants Finance 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 China Merchants Finance Technology Co Ltd filed Critical China Merchants Finance Technology Co Ltd
Priority to CN202011468375.2A priority Critical patent/CN112445623A/en
Publication of CN112445623A publication Critical patent/CN112445623A/en
Withdrawn 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/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
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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/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
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a cloud computing technology, and discloses a multi-cluster management method, which comprises the following steps: the method comprises the steps of obtaining a service request from a service request terminal, analyzing the service request by utilizing a pre-constructed multi-cluster service retrieval system, distributing the service request to a corresponding load balancer, forwarding the service request to a cluster agent of the multi-cluster service retrieval system by utilizing the load balancer, splitting the service request by utilizing the cluster agent to obtain service request fragments, deploying the service request fragments into clusters of the multi-cluster service retrieval system, carrying out service processing on the service request fragments by utilizing a preset service scheduling strategy to obtain service processing data, and feeding the service processing data back to the service request terminal. The invention also provides a multi-cluster management device, an electronic device and a computer readable storage medium. The invention can solve the problem that the service request can not be distributed efficiently.

Description

Multi-cluster management method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a method and an apparatus for multi-cluster management, an electronic device, and a computer-readable storage medium.
Background
With the popularization of cloud technology, more and more large enterprises start to use development strategies of multiple cloud platforms. On one hand, the strategy can achieve the effects of avoiding being limited by a single cloud provider, improving the delivery capacity of the service and the like; on the other hand, the strategy also brings new problems, for example, the resources of the enterprise project are dispersed in each data center and private cloud, which increases the difficulty of unified management. In the prior art, a Kubernetes engine is directly used for scheduling service requests, but the hybrid cloud scene needs to be adapted in a multi-cluster mode, and at the moment, underlying networks of different clusters are not necessarily communicated with each other, so that the service requests cannot be retrieved; in addition, when a multi-cluster processes a service request, a mirror image service component and a mirror image database for storing mirror images may be provided for each cluster, however, in the multi-cluster service scheduling, the mirror image service component and the mirror image database for storing mirror images occupy a large amount of computing resources, resulting in a waste of computing resources.
Disclosure of Invention
The invention provides a multi-cluster management method, a multi-cluster management device and a computer readable storage medium, and mainly aims to solve the problem that service requests cannot be distributed efficiently.
In order to achieve the above object, the present invention provides a multi-cluster management method, including:
acquiring a service request from a service request terminal, analyzing the service request by using a pre-constructed multi-cluster service retrieval system, and distributing the service request to a corresponding load balancer;
forwarding the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
splitting the service request by utilizing the cluster agent to obtain service request fragments, and deploying the service request fragments into a cluster of the multi-cluster service retrieval system;
and performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data, and feeding back the service processing data to the service request terminal.
Optionally, before the analyzing the service request by using the pre-built multi-cluster service retrieval system, the method further includes:
docking a preset container engine, and generating a plurality of containers in the container engine;
creating a proxy node and a corresponding load balancer of a cluster in the container;
and generating the multi-cluster service retrieval system based on the container, the proxy nodes of the clusters and the corresponding load balance.
Optionally, the analyzing the service request by using the pre-constructed multi-cluster service retrieval system, and distributing the service request to the corresponding load balancer includes:
analyzing the service request to obtain an IP address of the service request, and judging whether the service request is internal access or not according to the IP address;
if the service request is internal access, distributing the service request to a corresponding load balancer by using a pre-constructed retrieval plug-in, and recording an IP address;
and if the service request is not internal access, sending the service request to a load balancer with the same IP address by using a pre-constructed domain name server.
Optionally, the forwarding, by the load balancer, the service request to a cluster agent of the multi-cluster service retrieval system includes:
acquiring all running virtual machines in the cluster by using the load balancer;
and obtaining a migration factor of the service request according to the memory utilization rate and the performance utilization rate of the virtual machine, and forwarding the service request to a cluster agent according to the migration factor.
Optionally, the splitting the service request by using the cluster agent to obtain service request fragments includes:
acquiring a preset cluster weight, and calculating the number of containers expected to be deployed by each cluster according to the cluster weight;
judging whether the number of the containers expected to be deployed is less than the number of the remaining clusters;
if the number of the containers expected to be deployed is smaller than the number of the remaining clusters, performing service request splitting according to the number of the containers expected to be deployed to obtain a plurality of service request fragments;
and if the number of the containers expected to be deployed is larger than or equal to the number of the remaining clusters, performing service request splitting according to the number of the remaining clusters to obtain a plurality of service request fragments.
Optionally, the calculating the number of containers expected to be deployed for each cluster according to the cluster weight includes:
calculating and calculating the expected deployed container number DPod of each cluster by using the following formulai
Figure BDA0002834183960000031
Where Re represents the total number of containers desired to be deployed in the cluster, WiThe weight of the ith cluster is represented, and N is the number of clusters.
Optionally, the performing service processing on the service request fragment by using a preset service scheduling policy to obtain service processing data includes:
updating the service request fragments in each cluster in real time, and deleting the records of which the service request fragments are 0;
judging whether the service request fragment is created for the first time;
if the service request fragment is created for the first time, directly writing the service request fragment into a scheduling result set;
if the service request fragment is not created for the first time, acquiring a last scheduling result set;
and inquiring corresponding service processing data in a preset storage system according to the record in the scheduling result set.
In order to solve the above problem, the present invention also provides a multi-cluster management apparatus, including:
the request analysis module is used for acquiring a service request from a service request terminal, analyzing the service request by utilizing a pre-constructed multi-cluster service retrieval system and distributing the service request to a corresponding load balancer;
a load distribution module, configured to forward the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
a request splitting module, configured to split the service request by using the cluster agent to obtain service request fragments, and deploy the service request fragments to a cluster of the multi-cluster service retrieval system;
and the service feedback module is used for performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data and feeding the service processing data back to the service request terminal.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the multi-cluster management method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium having at least one instruction stored therein, where the at least one instruction is executed by a processor in an electronic device to implement the multi-cluster management method described above.
The pre-constructed multi-cluster service retrieval system analyzes the service request, distributes the service request to the corresponding load balancer, forwards the service request to the cluster agent by using the load balancer, splits the service request by using the cluster agent to obtain service request fragments, splits one service request into a plurality of service request fragments, and improves the utilization efficiency of multiple clusters. And the service request fragments can be efficiently processed through a preset service scheduling strategy. Therefore, the multi-cluster management method, the multi-cluster management device, the electronic equipment and the computer-readable storage medium provided by the invention can solve the problem that the service request cannot be efficiently distributed.
Drawings
Fig. 1 is a flowchart illustrating a multi-cluster management method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart showing a detailed implementation of one of the steps in FIG. 1;
FIG. 3 is a schematic flow chart showing another step of FIG. 1;
FIG. 4 is a schematic flow chart showing another step of FIG. 1;
FIG. 5 is a schematic flow chart showing another step in FIG. 1;
FIG. 6 is a functional block diagram of a multi-cluster management apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device for implementing the multi-cluster management method according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a multi-cluster management method. The executing body of the multi-cluster management method includes, but is not limited to, at least one of the electronic devices that can be configured to execute the method provided by the embodiments of the present application, such as a server, a terminal, and the like. In other words, the multi-cluster management method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Fig. 1 is a schematic flow chart of a multi-cluster management method according to an embodiment of the present invention. In this embodiment, the multi-cluster management method includes:
s1, obtaining service request from service request terminal, analyzing the service request by using pre-constructed multi-cluster service retrieval system, and distributing the service request to corresponding load balancer.
In the embodiment of the present invention, the service request may be a data query request, such as a bank field, and the service request may be a user information query request, a financial information query request, a transaction information query request, and the like.
Specifically, before the analyzing the service request by using the pre-constructed multi-cluster service retrieval system, the method further includes:
docking a preset container engine, and generating a plurality of containers in the container engine;
creating a proxy node and a corresponding load balancer of a cluster in the container;
and generating the multi-cluster service retrieval system based on the container, the proxy nodes of the clusters and the corresponding load balance.
The preset container engine can be a kubernets engine, and the kubernets engine is an open-source container arranging engine and supports automatic deployment, large-scale scalability, application containerization management and the like. In the Kubernetes engine, a plurality of containers can be created by butting an API (application programming interface) in the Kubernetes engine, and then a load balancing strategy is implemented through a built-in load balancer to realize management, discovery, access and the like of service requests, so that operation and maintenance personnel are not required to perform complex manual configuration and processing.
Referring to fig. 2, the analyzing the service request by using the pre-constructed multi-cluster service retrieval system and distributing the service request to the corresponding load balancer includes:
s10, analyzing the service request to obtain the IP address of the service request, and judging whether the service request is internal access according to the IP address;
if the service request is internal access, executing S11, distributing the service request to a corresponding load balancer by using a pre-constructed retrieval plug-in, and recording an IP address;
if the service request is not an internal access, S12 is executed, and the service request is sent to a load balancer with the same IP address by using a pre-constructed domain name server.
The load balancer can balance and distribute the load (service request) to the cluster agent of the multi-cluster service retrieval system to operate, so that the work task is completed cooperatively. The cluster agent is used for splitting and distributing the service request before the service request enters the cluster. The retrieval plug-in may be a KubeDNS plug-in, and the KubeDNS plug-in is configured to retrieve a DNS resolution record and distribute according to the DNS resolution record. The DNS resolution record comprises a mapping relation between the service request and the IP address. And simultaneously, deploying a plurality of virtual machines in the cluster, and performing data processing on the service request by using the virtual machines. The Virtual Machine (Virtual Machine) refers to a complete computer system which has complete hardware system functions and runs in a completely isolated environment through software simulation, and the Virtual Machine can be used for reducing the occupation of a memory and is easy to maintain.
S2, forwarding the service request to the cluster agent of the multi-cluster service retrieval system by utilizing the load balancer.
In this embodiment of the present invention, referring to fig. 3, the S2 includes:
s20, acquiring all running virtual machines in the cluster by using the load balancer;
s21, obtaining a migration factor of the service request according to the memory utilization rate and the performance utilization rate of the virtual machine, and forwarding the service request to a cluster agent according to the migration factor.
In the embodiment of the invention, all running virtual machine memories in a cluster are obtained through a preset running memory function get VMfrom Host (), all running virtual machine memories are accumulated, and a ratio calculation is carried out on the virtual machine memories and the total memory of the cluster to obtain the memory utilization rate; further, a performance (map) object of the virtual machine CPU (i.e., vCPU, CPU of the virtual machine) is obtained by a performance function key ═ cpuMap, a cpuMap value corresponding to each key value records N record values of the virtual machine vCPU in a period of time, and the performance utilization rate is obtained by calculating an average value of the N record values. In the embodiment of the present invention, the memory utilization rate and the performance utilization rate are weighted and averaged to obtain the migration factor of the service request, and the service request is forwarded through a preset forwarding function vm. For example, in the embodiment of the present invention, two clusters exist for service request migration, and when the migration factor is greater than 1, the service request needs to be forwarded to the agent of cluster 1, and otherwise, the service request needs to be forwarded to the agent of cluster 2.
S3, the service request is split by the cluster agent to obtain service request fragments, and the service request fragments are deployed to the cluster of the multi-cluster service retrieval system.
In this embodiment of the present invention, referring to fig. 4, the splitting the service request by using the cluster agent to obtain service request fragments includes:
s30, acquiring preset cluster weight, and calculating the number of containers expected to be deployed by each cluster according to the cluster weight;
s31, judging whether the container quantity expected to be deployed is less than the residual cluster quantity;
if the number of the containers expected to be deployed is less than the number of the remaining clusters, executing S32, splitting the service request according to the number of the containers expected to be deployed to obtain a plurality of service request fragments;
and if the number of the containers expected to be deployed is greater than or equal to the number of the remaining clusters, executing S33, and splitting the service request according to the number of the remaining clusters to obtain a plurality of service request fragments.
In the embodiment of the invention, the expected container quantity DPod to be deployed for each cluster is calculated and calculated by using the following formulai
Figure BDA0002834183960000071
Where Re represents the total number of containers desired to be deployed in the cluster, WiThe weight of the ith cluster is represented, and N is the number of clusters.
Furthermore, the invention implements the splitting of the service request through the cluster agent, and can realize the reasonable splitting of the service request through the running state of each cluster.
S4, performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data, and feeding back the service processing data to the service request terminal.
Specifically, referring to fig. 5, the performing service processing on the service request fragment by using a preset service scheduling policy to obtain service processing data includes:
s40, updating the service request fragments in each cluster in real time, and deleting the record with the service request fragment being 0;
s41, judging whether the service request fragment is created for the first time;
if the service request fragment is created for the first time, executing S42 and directly writing the fragment into a scheduling result set;
if the service request fragment is not created for the first time, executing S43 and acquiring a last scheduling result set;
and S44, inquiring corresponding service processing data in a preset storage system according to the record in the scheduling result set.
In the embodiment of the present invention, the preset storage system may be a key value storage system Etcd, where the key value storage system Etcd is a key/value storage service applied in a distributed environment, and data may be written in or read from the Etcd through the service fragment request.
Furthermore, in the embodiment of the present invention, the task scheduling is performed on the service request fragments by using the preset service scheduling policy, so that the query can be quickly performed in the preset storage system, and the processing efficiency of the service request is improved.
The pre-constructed multi-cluster service retrieval system analyzes the service request, distributes the service request to the corresponding load balancer, forwards the service request to the cluster agent by using the load balancer, splits the service request by using the cluster agent to obtain service request fragments, splits one service request into a plurality of service request fragments, and improves the utilization efficiency of multiple clusters. And the service request fragments can be efficiently processed through a preset service scheduling strategy. Therefore, the implementation of the invention can solve the problem that the service request cannot be efficiently distributed.
Fig. 6 is a functional block diagram of a multi-cluster management apparatus according to an embodiment of the present invention.
The multi-cluster management apparatus 100 of the present invention may be installed in an electronic device. According to the implemented functions, the multi-cluster management apparatus 100 may include a request parsing module 101, a load distribution module 102, a request splitting module 103, and a service feedback module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the request analysis module 101 is configured to obtain a service request from a service request terminal, analyze the service request by using a pre-constructed multi-cluster service retrieval system, and distribute the service request to a corresponding load balancer.
In the embodiment of the present invention, the service request may be a data query request, such as a bank field, and the service request may be a user information query request, a financial information query request, a transaction information query request, and the like.
Specifically, before the request parsing module 101 parses the service request, the method further includes:
docking a preset container engine, and generating a plurality of containers in the container engine;
creating a proxy node and a corresponding load balancer of a cluster in the container;
and generating the multi-cluster service retrieval system based on the container, the proxy nodes of the clusters and the corresponding load balance.
The preset container engine can be a kubernets engine, and the kubernets engine is an open-source container arranging engine and supports automatic deployment, large-scale scalability, application containerization management and the like. In the Kubernetes engine, a plurality of containers can be created by butting an API (application programming interface) in the Kubernetes engine, and then a load balancing strategy is implemented through a built-in load balancer to realize management, discovery, access and the like of service requests, so that operation and maintenance personnel are not required to perform complex manual configuration and processing.
The request parsing module 101 parses the service request and distributes the service request to a corresponding load balancer by the following operations:
analyzing the service request to obtain an IP address of the service request, and judging whether the service request is internal access or not according to the IP address;
if the service request is internal access, distributing the service request to a corresponding load balancer by using a pre-constructed retrieval plug-in, and recording an IP address;
and if the service request is not internal access, sending the service request to a load balancer with the same IP address by using a pre-constructed domain name server.
The load balancer can balance and distribute the load (service request) to the cluster agent of the multi-cluster service retrieval system to operate, so that the work task is completed cooperatively. The cluster agent is used for splitting and distributing the service request before the service request enters the cluster. The retrieval plug-in may be a KubeDNS plug-in, and the KubeDNS plug-in is configured to retrieve a DNS resolution record and distribute according to the DNS resolution record. The DNS resolution record comprises a mapping relation between the service request and the IP address. And simultaneously, deploying a plurality of virtual machines in the cluster, and performing data processing on the service request by using the virtual machines. The Virtual Machine (Virtual Machine) refers to a complete computer system which has complete hardware system functions and runs in a completely isolated environment through software simulation, and the Virtual Machine can be used for reducing the occupation of a memory and is easy to maintain.
The load distribution module 102 is configured to forward the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer.
Preferably, the load distribution module 102 forwards the service request to the cluster agent of the multi-cluster service retrieval system by:
acquiring all running virtual machines in the cluster by using the load balancer;
and obtaining a migration factor of the service request according to the memory utilization rate and the performance utilization rate of the virtual machine, and forwarding the service request to a cluster agent according to the migration factor.
In the embodiment of the invention, all running virtual machine memories in a cluster are obtained through a preset running memory function get VMfrom Host (), all running virtual machine memories are accumulated, and a ratio calculation is carried out on the virtual machine memories and the total memory of the cluster to obtain the memory utilization rate; further, a performance (map) object of the virtual machine CPU (i.e., vCPU, CPU of the virtual machine) is obtained by a performance function key ═ cpuMap, a cpuMap value corresponding to each key value records N record values of the virtual machine vCPU in a period of time, and the performance utilization rate is obtained by calculating an average value of the N record values. In the embodiment of the present invention, the memory utilization rate and the performance utilization rate are weighted and averaged to obtain the migration factor of the service request, and the service request is forwarded through a preset forwarding function vm. For example, in the embodiment of the present invention, two clusters exist for service request migration, and when the migration factor is greater than 1, the service request needs to be forwarded to the agent of cluster 1, and otherwise, the service request needs to be forwarded to the agent of cluster 2.
The request splitting module 103 is configured to split the service request by using the cluster agent to obtain service request fragments, and deploy the service request fragments to a cluster of the multi-cluster service retrieval system.
Preferably, the request splitting module 103 obtains the service request fragments by:
acquiring a preset cluster weight, and calculating the number of containers expected to be deployed by each cluster according to the cluster weight;
judging whether the number of the containers expected to be deployed is less than the number of the remaining clusters;
if the number of the containers expected to be deployed is smaller than the number of the remaining clusters, performing service request splitting according to the number of the containers expected to be deployed to obtain a plurality of service request fragments;
and if the number of the containers expected to be deployed is larger than or equal to the number of the remaining clusters, performing service request splitting according to the number of the remaining clusters to obtain a plurality of service request fragments.
In the embodiment of the invention, the expected container quantity DPod to be deployed for each cluster is calculated and calculated by using the following formulai
Figure BDA0002834183960000101
Where Re represents the total number of containers desired to be deployed in the cluster, WiThe weight of the ith cluster is represented, and N is the number of clusters.
Furthermore, the invention implements the splitting of the service request through the cluster agent, and can realize the reasonable splitting of the service request through the running state of each cluster.
The service feedback module 104 is configured to query corresponding service processing data in a preset storage system according to the record in the scheduling result set.
Preferably, the service feedback module 104 obtains the service processing data by:
updating the service request fragments in each cluster in real time, and deleting the records of which the service request fragments are 0;
judging whether the service request fragment is created for the first time;
if the service request fragment is created for the first time, directly writing the service request fragment into a scheduling result set;
if the service request fragment is not created for the first time, acquiring a last scheduling result set;
and inquiring corresponding service processing data in a preset storage system according to the record in the scheduling result set.
In the embodiment of the present invention, the preset storage system may be a key value storage system Etcd, where the key value storage system Etcd is a key/value storage service applied in a distributed environment, and data may be written in or read from the Etcd through the service fragment request.
Furthermore, in the embodiment of the present invention, the task scheduling is performed on the service request fragments by using the preset service scheduling policy, so that the query can be quickly performed in the preset storage system, and the processing efficiency of the service request is improved.
Fig. 7 is a schematic structural diagram of an electronic device implementing a multi-cluster management method according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11 and a bus, and may further comprise a computer program, such as a multi-cluster management program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the multi-cluster management program 12, but also to temporarily store data that has been output or is to be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., a multi-cluster management program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
Fig. 7 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 7 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The multi-cluster management program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
acquiring a service request from a service request terminal, analyzing the service request by using a pre-constructed multi-cluster service retrieval system, and distributing the service request to a corresponding load balancer;
forwarding the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
splitting the service request by utilizing the cluster agent to obtain service request fragments, and deploying the service request fragments into a cluster of the multi-cluster service retrieval system;
and performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data, and feeding back the service processing data to the service request terminal.
Specifically, the specific implementation method of the processor 10 for the instruction may refer to the description of the relevant steps in the embodiments corresponding to fig. 1 to fig. 5, which is not repeated herein.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
acquiring a service request from a service request terminal, analyzing the service request by using a pre-constructed multi-cluster service retrieval system, and distributing the service request to a corresponding load balancer;
forwarding the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
splitting the service request by utilizing the cluster agent to obtain service request fragments, and deploying the service request fragments into a cluster of the multi-cluster service retrieval system;
and performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data, and feeding back the service processing data to the service request terminal.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for multi-cluster management, the method comprising:
acquiring a service request from a service request terminal, analyzing the service request by using a pre-constructed multi-cluster service retrieval system, and distributing the service request to a corresponding load balancer;
forwarding the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
splitting the service request by utilizing the cluster agent to obtain service request fragments, and deploying the service request fragments into a cluster of the multi-cluster service retrieval system;
and performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data, and feeding back the service processing data to the service request terminal.
2. The multi-cluster management method of claim 1, wherein prior to parsing the service request using a pre-built multi-cluster service retrieval system, the method further comprises:
docking a preset container engine, and generating a plurality of containers in the container engine;
creating a proxy node and a corresponding load balancer of a cluster in the container;
and generating the multi-cluster service retrieval system based on the container, the proxy nodes of the clusters and the corresponding load balance.
3. The multi-cluster management method according to claim 1, wherein the parsing the service request by using the pre-built multi-cluster service retrieval system and distributing the service request to the corresponding load balancer comprises:
analyzing the service request to obtain an IP address of the service request, and judging whether the service request is internal access or not according to the IP address;
if the service request is internal access, distributing the service request to a corresponding load balancer by using a pre-constructed retrieval plug-in, and recording an IP address;
and if the service request is not internal access, sending the service request to a load balancer with the same IP address by using a pre-constructed domain name server.
4. The multi-cluster management method of claim 1, wherein said forwarding the service request to a cluster agent of the multi-cluster service retrieval system using the load balancer comprises:
acquiring all running virtual machines in the cluster by using the load balancer;
and obtaining a migration factor of the service request according to the memory utilization rate and the performance utilization rate of the virtual machine, and forwarding the service request to a cluster agent according to the migration factor.
5. The method for multi-cluster management according to claim 1, wherein the splitting the service request by the cluster agent to obtain service request fragments comprises:
acquiring a preset cluster weight, and calculating the number of containers expected to be deployed by each cluster according to the cluster weight;
judging whether the number of the containers expected to be deployed is less than the number of the remaining clusters;
if the number of the containers expected to be deployed is smaller than the number of the remaining clusters, performing service request splitting according to the number of the containers expected to be deployed to obtain a plurality of service request fragments;
and if the number of the containers expected to be deployed is larger than or equal to the number of the remaining clusters, performing service request splitting according to the number of the remaining clusters to obtain a plurality of service request fragments.
6. The multi-cluster management method of claim 5, wherein said calculating the number of containers expected to be deployed per cluster from the cluster weights comprises:
calculating and calculating the expected deployed container number DPod of each cluster by using the following formulai
Figure FDA0002834183950000021
Where Re represents the total number of containers desired to be deployed in the cluster, WiThe weight of the ith cluster is represented, and N is the number of clusters.
7. The multi-cluster management method according to any one of claims 1 to 5, wherein the performing service processing on the service request fragment by using a preset service scheduling policy to obtain service processing data comprises:
updating the service request fragments in each cluster in real time, and deleting the records of which the service request fragments are 0;
judging whether the service request fragment is created for the first time;
if the service request fragment is created for the first time, directly writing the service request fragment into a scheduling result set;
if the service request fragment is not created for the first time, acquiring a last scheduling result set;
and inquiring corresponding service processing data in a preset storage system according to the record in the scheduling result set.
8. A multi-cluster management apparatus, the apparatus comprising:
the request analysis module is used for acquiring a service request from a service request terminal, analyzing the service request by utilizing a pre-constructed multi-cluster service retrieval system and distributing the service request to a corresponding load balancer;
a load distribution module, configured to forward the service request to a cluster agent of the multi-cluster service retrieval system by using the load balancer;
a request splitting module, configured to split the service request by using the cluster agent to obtain service request fragments, and deploy the service request fragments to a cluster of the multi-cluster service retrieval system;
and the service feedback module is used for performing service processing on the service request fragments by using a preset service scheduling strategy to obtain service processing data and feeding the service processing data back to the service request terminal.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the multi-cluster management method of any one of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a multi-cluster management method according to any one of claims 1 to 7.
CN202011468375.2A 2020-12-14 2020-12-14 Multi-cluster management method and device, electronic equipment and storage medium Withdrawn CN112445623A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011468375.2A CN112445623A (en) 2020-12-14 2020-12-14 Multi-cluster management method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011468375.2A CN112445623A (en) 2020-12-14 2020-12-14 Multi-cluster management method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112445623A true CN112445623A (en) 2021-03-05

Family

ID=74739744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011468375.2A Withdrawn CN112445623A (en) 2020-12-14 2020-12-14 Multi-cluster management method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112445623A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326100A (en) * 2021-06-29 2021-08-31 深信服科技股份有限公司 Cluster management method, device and equipment and computer storage medium
CN113407996A (en) * 2021-06-28 2021-09-17 湖南大学 Distributed account book autonomous controllable privacy protection system and cluster architecture thereof
CN114024971A (en) * 2021-10-21 2022-02-08 郑州云海信息技术有限公司 Business data processing method, Kubernetes cluster and medium
CN115412549A (en) * 2021-05-27 2022-11-29 北京金山云网络技术有限公司 Information configuration method and device and request processing method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412549A (en) * 2021-05-27 2022-11-29 北京金山云网络技术有限公司 Information configuration method and device and request processing method and device
CN113407996A (en) * 2021-06-28 2021-09-17 湖南大学 Distributed account book autonomous controllable privacy protection system and cluster architecture thereof
CN113326100A (en) * 2021-06-29 2021-08-31 深信服科技股份有限公司 Cluster management method, device and equipment and computer storage medium
CN113326100B (en) * 2021-06-29 2024-04-09 深信服科技股份有限公司 Cluster management method, device, equipment and computer storage medium
CN114024971A (en) * 2021-10-21 2022-02-08 郑州云海信息技术有限公司 Business data processing method, Kubernetes cluster and medium
CN114024971B (en) * 2021-10-21 2024-02-13 郑州云海信息技术有限公司 Service data processing method, kubernetes cluster and medium

Similar Documents

Publication Publication Date Title
CN112445623A (en) Multi-cluster management method and device, electronic equipment and storage medium
CN114691050B (en) Cloud native storage method, device, equipment and medium based on kubernets
CN108073423A (en) A kind of accelerator loading method, system and accelerator loading device
CN112328656B (en) Service query method, device, equipment and storage medium based on middle platform architecture
CN111917587A (en) Method for network service management by using service system and service system
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN114124968A (en) Load balancing method, device, device and medium based on market data
CN113542387A (en) System publishing method, device, electronic equipment and storage medium
CN114675976B (en) GPU (graphics processing Unit) sharing method, device, equipment and medium based on kubernets
CN114860349B (en) Data loading method, device, equipment and medium
CN116647560A (en) Method, device, equipment and medium for coordinated optimization control of Internet of things computer clusters
CN113918305B (en) Node scheduling method, node scheduling device, electronic equipment and readable storage medium
CN112991505B (en) Online 3D rendering method
CN115827179A (en) Computing power scheduling method, device, equipment and storage medium for physical machine equipment
CN112637280B (en) Data transmission method, device, electronic equipment and storage medium
CN115981788A (en) Distributed storage deployment method, device, equipment and storage medium
CN116954815A (en) Resource scheduling method and device, computer equipment and computer readable storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN114626103A (en) Data consistency comparison method, device, equipment and medium
CN113918603A (en) Hash cache generation method and device, electronic equipment and storage medium
CN113923218A (en) Codec plug-in distributed deployment method, device, device and medium
CN113157406A (en) Data calling method and device based on super-fusion architecture, electronic equipment and medium
CN115934576B (en) Test case generation method, device, equipment and medium in transaction scene
CN112631784B (en) Resource-based allocation/processing method and electronic device
CN117522396A (en) Payment channel configuration method, device, equipment and 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20210305