CN116647599A - Micro-service scheduling method, device, equipment and storage medium - Google Patents

Micro-service scheduling method, device, equipment and storage medium Download PDF

Info

Publication number
CN116647599A
CN116647599A CN202310610435.7A CN202310610435A CN116647599A CN 116647599 A CN116647599 A CN 116647599A CN 202310610435 A CN202310610435 A CN 202310610435A CN 116647599 A CN116647599 A CN 116647599A
Authority
CN
China
Prior art keywords
service
micro
computing node
value
scheduling
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
CN202310610435.7A
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.)
Tianyi Shilian Technology Co ltd
Original Assignee
Tianyi Digital Life 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 Tianyi Digital Life Technology Co Ltd filed Critical Tianyi Digital Life Technology Co Ltd
Priority to CN202310610435.7A priority Critical patent/CN116647599A/en
Publication of CN116647599A publication Critical patent/CN116647599A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a micro-service scheduling method, a micro-service scheduling device, micro-service scheduling equipment and a micro-service storage medium, wherein a target computing node is selected from all computing nodes in a service cluster by responding to a request instruction for scheduling all micro-services in the service cluster; deploying a target controller acquired in advance on a target computing node to obtain an independent computing node; transmitting each micro-service to an independent computing node, so that the independent computing node can determine the category, the first service value and the second service value of each micro-service; based on the class, the first service value and the second service value of each micro service, each micro service is sent to each computing node except the independent computing node so as to complete the scheduling process of each micro service. The scheme determines the parameters of each micro service, including the category, the first service value and the second service value, and then schedules each micro service according to the parameters, so that the scheduling result can be optimized, and the efficient operation of the service cluster is ensured.

Description

Micro-service scheduling method, device, equipment and storage medium
Technical Field
The present application relates to the field of service scheduling technologies, and in particular, to a method, an apparatus, a device, and a storage medium for scheduling micro services.
Background
In a cloud native environment in the technical field of micro-service scheduling, thousands of micro-services can appear in one service cluster, so that the calling relationship of each micro-service needs to be managed and stored, and during service deployment, operation and maintenance personnel can correspondingly schedule each micro-service according to the estimated resource use condition of different micro-services.
However, the use condition of the resources can change, if the service values of the micro services, such as cpu, memory value, etc., are unreasonably set, the resource utilization rate of the whole cluster can be affected, and the whole operation of the service cluster is not facilitated.
Disclosure of Invention
In view of this, the present application provides a method, apparatus, device and storage medium for scheduling micro services, which are used to solve the problem that the service condition of resources will change, and if the service value of each micro service, such as cpu, memory value, etc., is unreasonable, the resource utilization rate of the whole cluster will be affected, which is not beneficial to the whole operation of the service cluster.
In order to achieve the above object, the following schemes are proposed:
in a first aspect, a method for scheduling micro services includes:
responding to a request instruction for scheduling each micro-service in a service cluster, and selecting a target computing node from each computing node in the service cluster;
deploying a target controller acquired in advance on the target computing node to obtain an independent computing node;
transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
Preferably, the process of determining the category of each micro service by the independent computing node includes:
determining call information between every two micro services, and combining the call information into a call information set;
performing dimension reduction on the call information set to obtain a two-dimensional data set corresponding to the call relation set;
and clustering the two-dimensional data sets to obtain the category of each micro service.
Preferably, the process of determining the first service value of each micro service by the independent computing node includes:
for each micro-service, acquiring each processor value corresponding to the micro-service in a first preset time period;
taking the average value of each processor value as the minimum value of the processor corresponding to the micro service;
the processor minimum value is taken as a first service value of the micro service.
Preferably, the process of determining the second service value of each micro service by the independent computing node includes:
for each micro-service, acquiring each memory value corresponding to the micro-service in a first preset time period;
taking the average value of each memory value as the minimum memory value corresponding to the micro service;
and taking the memory minimum value as a second service value of the micro service.
Preferably, the sending each micro service to each computing node except the independent computing node based on the category of each micro service, the first service value and the second service value includes:
for each category, taking each micro service with the same category as each soft affinity service corresponding to the category;
combining each soft parent service corresponding to the category into a micro service group corresponding to the category;
determining a response node corresponding to the micro service group from each computing node except the independent computing node based on the first service value and the second service value of each soft affinity service in the micro service group;
and sending the micro service group to the response node.
Preferably, the determining the call information between every two micro services and combining the call information into a call information set includes:
judging whether a first service corresponding to each micro service exists in the independent computing node or not according to each micro service;
if a first service corresponding to the micro service exists in the independent computing node, acquiring first calling information of the first service;
determining the calling relationship between the micro service and other micro services based on the first calling information;
and integrating the calling relationship between each micro service and other micro services to obtain the calling information set.
Preferably, the target controller is a MutatingAdmission webhooks admission controller.
In a second aspect, a micro-service scheduling apparatus includes:
the target computing node selection module is used for responding to a request instruction for scheduling each micro service in the service cluster and selecting a target computing node from all computing nodes in the service cluster;
the deployment module is used for deploying the target controller acquired in advance on the target computing node to obtain an independent computing node;
the parameter determining module is used for sending each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and the sending module is used for sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
In a third aspect, a micro-service scheduling apparatus includes a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the micro service scheduling method according to the first aspect.
In a fourth aspect, a storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the micro-service scheduling method according to the first aspect.
From the above technical solution, it can be seen that the present application selects a target computing node from the computing nodes in a service cluster by responding to a request instruction for scheduling each micro-service in the service cluster; deploying a target controller acquired in advance on the target computing node to obtain an independent computing node; transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service; and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service. According to the scheme, the target controller is deployed on the target computing node to obtain an independent computing node, all the micro services are sent to the independent computing node to obtain parameters of each micro service, including a category, a first service value and a second service value, and each micro service is scheduled according to the parameters, so that a scheduling result can be optimized, and efficient operation of a service cluster is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is an alternative flow chart of a method for scheduling micro services according to an embodiment of the present application;
FIGS. 2-5 are code logic diagrams according to embodiments of the present application;
fig. 6 is a schematic structural diagram of a micro-service scheduling device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a micro-service scheduling device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In a cloud native environment in the technical field of micro-service scheduling, thousands of micro-services can appear in one service cluster, so that the calling relationship of each micro-service needs to be managed and stored, and during service deployment, operation and maintenance personnel can correspondingly schedule each micro-service according to the estimated resource use condition of different micro-services.
However, the use condition of the resources will change, if the service values of each micro service, such as cpu, memory value, etc., are unreasonable, such as too large cpu, memory value, etc., the resource utilization rate of the whole cluster will be affected, or too small setting will affect the service stability, which is not beneficial to the whole operation of the service cluster.
In order to solve the above-mentioned drawbacks, an embodiment of the present application provides a method for scheduling micro services, which may be applied to various computer terminals or intelligent terminals, and the execution subject of the method may be a processor or a server of the computer terminal or the intelligent terminal, and a flowchart of the method is shown in fig. 1, and specifically includes:
s1: in response to a request instruction to schedule individual micro-services in a service cluster, a target computing node is selected from among the computing nodes in the service cluster.
In particular, the k8s cluster may be used as a service cluster in the present application, where the service cluster includes a plurality of computing nodes, and the computing nodes may be understood as servers, and each computing node is an independent server. When each micro service needs to be updated, responding to a request instruction for scheduling each micro service in a service cluster, and selecting one computing node from all computing nodes in the service cluster as a target computing node.
The selection method may be a random selection or a selection based on the characteristics of the service cluster, which is not limited in this embodiment.
S2: and deploying the target controller acquired in advance on the target computing node to obtain an independent computing node.
In order not to affect the online service, a pre-selected target controller can be deployed on the target computing node, so that an independent computing node is obtained, and the target controller can be deployed on the target computing node in a containerized manner.
S3: and sending each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service.
Optionally, before sending each micro-service to the independent computing node, the majorization tag of each micro-service is obtained first, and whether the majorization tag of each micro-service is false or true is determined, which is understood that the majorization tag of each micro-service is preset to indicate whether each micro-service is to be adaptively optimized. For each micro-service, if the localization tag of the micro-service is false, the micro-service does not need to be sent to an independent computing node; if the micro-service gets a mapping tag to true, the micro-service needs to be sent to an independent compute node.
And after determining each micro-service needing to be adaptively optimized, transmitting each micro-service to an independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service.
S4: and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
Then, according to the obtained category, the first service value and the second service value of each micro service, how to schedule each micro service can be determined, so that the operation and maintenance cost of the service cluster is reduced. Alternatively, this step may be implemented using kube-apiserver (micro-service response component).
In the method provided by the embodiment of the application, the process of determining the category of each micro service by the independent computing node is specifically described as follows:
s31: call information between every two micro services is determined and combined into a call information set.
Specifically, the step may include:
judging whether a first service corresponding to each micro service exists in the independent computing node or not according to each micro service; if a first service corresponding to the micro service exists in the independent computing node, acquiring first calling information of the first service; determining the calling relationship between the micro service and other micro services based on the first calling information; and integrating the calling relationship between each micro service and other micro services to obtain the calling information set.
The first service may be understood as a service of the same type as the micro service, if a first service of the same type as the micro service exists in an independent computing node, trace and span data may be extracted from an iso component dapper by using a DataStore micro service governance capability of an iso to obtain first call information of the first service, and then a mutual call relationship between the micro service and other micro services is determined according to the first call information. If the micro service A and the micro service B have a calling relation, the calling information between the micro service A and the micro service B is expressed as 1, and if the micro service A and the micro service B have no calling relation, the calling information between the micro service A and the micro service B is expressed as 0. In addition, the call information between the micro services themselves is 1, and in one example, there are A, B, C, D four micro services, and the call information set between the four micro services can be as shown in table 1 below:
TABLE 1
Service A B C D
A 1 0 1 0
B 1 1 0 1
C 0 1 1 0
D 1 0 0 1
S32: and reducing the dimension of the call information set to obtain a two-dimensional data set corresponding to the call relation set.
In this step, the calling information set in table 1 is used, PAC dimension reduction is performed on the calling information set, so as to obtain a two-dimensional data set corresponding to the calling information set, as shown in the following table 2:
TABLE 2
A B C D
X Xa Xb Cx Dx
Y Ya Yb Cy Dy
S33: and clustering the two-dimensional data sets to obtain the category of each micro service.
Specifically, the two-dimensional data set in the above table 2 is used, and the two-dimensional data set is adaptively clustered by DBSCAN clustering, so that the category of each micro service can be obtained, which is specifically shown in the following table 3:
TABLE 3 Table 3
A B C D
Category(s) Label1 Label2 Label2 Label1
As can be seen from table 3 above, the categories of the micro service a and the micro service D are the same, and are Label1; the class of micro service B and micro service C is the same, label2.
The above embodiments describe the process of determining the class of each micro service by the independent computing node in the present application, and the following describes the process of determining the first service value and the second service value of each micro service by the independent computing node in the present application in detail.
First service value: for each micro-service, acquiring each processor value corresponding to the micro-service in a first preset time period; taking the average value of each processor value as the minimum value of the processor corresponding to the micro service; the processor minimum value is taken as a first service value of the micro service.
Second service value: for each micro-service, acquiring each memory value corresponding to the micro-service in a first preset time period; taking the average value of each memory value as the minimum memory value corresponding to the micro service; and taking the memory minimum value as a second service value of the micro service.
Alternatively, the target controller may obtain the respective processor value (CPU value) and the respective memory value in the first preset time period through promethaus, where the first preset time period may be 7 days, and then the respective CPU value and the respective memory value in 7 days, that is, the CPU value and the memory value in each day in the 7 days. After the respective average value is calculated, the average value is used as the minimum value of the micro-service, namely the requests value, so that the use of resources is optimized.
The following describes in detail a procedure of transmitting each micro service to each computing node except the independent computing node based on the class, the first service value, and the second service value of each micro service in the present application.
For each category, taking each micro service with the same category as each soft affinity service corresponding to the category; combining each soft parent service corresponding to the category into a micro service group corresponding to the category; determining a response node corresponding to the micro service group from each computing node except the independent computing node based on the first service value and the second service value of each soft affinity service in the micro service group; and sending the micro service group to the response node.
Specifically, in order to improve the efficiency of mutual access between micro services, an operator may set affinities for micro services having a high call relationship or belonging to the same category, and the affinity settings between micro services are more complex than the resource settings. When the micro-services are online, operation and maintenance personnel set corresponding pod affinities (soft and hard), pod anti-affinities (soft and hard), node anti-affinities (soft and hard) and the like according to the calling relations among the micro-services, wherein the calling relations of the computing nodes are not changed generally, and the scheduling relations of the micro-services become more complex along with the increase of the number of the micro-services.
Optionally, two special admission controllers are included in Kubernetes apiserver: mutatingAdmission webhooks, validatingAdmission, the two controllers will send admission requests to external HTTP callback services and return the processing results to kube-apiserver for kube-apiserver to update and schedule the microservices. In the present application, the target controller may select MutatingAdmission webhooks an admission controller and MutatingAdmission webhooks an admission controller may intercept request instructions to update or schedule micro-services. In addition, it is necessary to ensure that the MutatingAdmission webhooks admission controller is enabled in the apiserver configuration file to ensure MutatingAdmission webhooks that the admission controller works properly, and the logic code diagram of this process may be as shown in fig. 2. In the process, the logic code of the MutatingAdmission webhooks admission controller may be packed into a Docker mirror image and one depoyment used to run the controller. The logic code diagram of the MutatingAdmission webhooks admission controller may be as shown in fig. 3. Next, the process of containerizing Deployment of MutatingAdmission webhooks admission controllers on a Service cluster, such as a Kubernetes cluster, may be implemented using a replyment+service, and the logical code diagram of this process may be as shown in fig. 4.
After the MutatingAdmission webhooks admission controller is deployed in a Kubernetes cluster in a containerized manner, the service implemented above is not yet docked with the mutte Webhook, so that the service is required to be registered in the mutte Webhook, the process only needs to create a Kubernetes resource object of mutate WebhookConfiguration type, in which the Webhook can be configured without the service then naming the Webhook as a "Webhook"
io.ydzs.adjacency-region and it is necessary to ensure that the naming is unique among clusters. The configuration of the webhook is then specified under what conditions the rule attribute is to be used under, where this webhook only needs to be invoked when a Pod is created. In addition, under the ClientConfig attribute, it is also required to specify how Kubernetes APIServer can find webhook Service, which can be served under the/validate path by a Service named admission-registry under the default namespace, and a candable attribute, which indicates that APIServer can be used by a client to verify server certificates on webhook applications by specifying a PEM-formatted CA bundle, and the corresponding registered webhook resource list is shown in fig. 5.
Corresponding to the method described in fig. 1, the embodiment of the present application further provides a micro-service scheduling apparatus, which is used for implementing the method in fig. 1, where the micro-service scheduling apparatus provided in the embodiment of the present application may be described in a computer terminal or various mobile devices with reference to fig. 6, and as shown in fig. 6, the apparatus may include:
a target computing node selection module 10, configured to select a target computing node from the computing nodes in the service cluster in response to a request instruction for scheduling each micro service in the service cluster;
the deployment module 20 is configured to deploy a target controller acquired in advance on the target computing node to obtain an independent computing node;
a parameter determining module 30, configured to send each micro service to the independent computing node, so that the independent computing node determines a class, a first service value, and a second service value of each micro service;
and a sending module 40, configured to send each micro service to each computing node except the independent computing node based on the class, the first service value and the second service value of each micro service, so as to complete the scheduling process of each micro service.
From the above technical solution, it can be seen that the present application selects a target computing node from the computing nodes in a service cluster by responding to a request instruction for scheduling each micro-service in the service cluster; deploying a target controller acquired in advance on the target computing node to obtain an independent computing node; transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service; and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service. According to the scheme, the target controller is deployed on the target computing node to obtain an independent computing node, all the micro services are sent to the independent computing node to obtain parameters of each micro service, including a category, a first service value and a second service value, and each micro service is scheduled according to the parameters, so that a scheduling result can be optimized, and efficient operation of a service cluster is ensured.
In one example, the parameter determination module 30 may include:
the combination module is used for determining calling information between every two micro services and combining the calling information into a calling information set;
the dimension reduction module is used for reducing dimension of the call information set to obtain a two-dimensional data set corresponding to the call relation set;
and the clustering module is used for clustering the two-dimensional data sets to obtain the categories of the micro services.
In one example, the parameter determination module 30 may include:
the first acquisition module is used for acquiring each processor value corresponding to each micro service in a first preset time period;
the first average value calculation module is used for taking the average value of each processor value as the minimum value of the processor corresponding to the micro service;
and the first assignment module is used for taking the minimum value of the processor as a first service value of the micro service.
In one example, the parameter determination module 30 may further include:
the second acquisition module is used for acquiring each memory value corresponding to each micro service in a first preset time period;
the second average value calculation module is used for taking the average value of each memory value as the minimum memory value corresponding to the micro-service;
and the second assignment module is used for taking the memory minimum value as a second service value of the micro service.
In one example, the transmitting module 40 may include:
the micro service group obtaining module is used for combining each soft parent and service corresponding to the category into a micro service group corresponding to the category;
a response node determining module, configured to determine, from each computing node except the independent computing node, a response node corresponding to the micro service group based on a first service value and a second service value of each soft affinity service in the micro service group;
and the micro service group sending module is used for sending the micro service group to the response node.
In one example, the combining module may include:
the judging module is used for judging whether a first service corresponding to each micro service exists in the independent computing node or not according to each micro service;
the first call information acquisition module is used for acquiring first call information of a first service corresponding to the micro service if the first service exists in the independent computing node;
the inter-calling relation determining module is used for determining the inter-calling relation between the micro service and other micro services based on the first calling information;
and the integration module is used for integrating the calling relationship between each micro service and other micro services to obtain the calling information set.
Further, the embodiment of the application provides a micro-service scheduling device. Alternatively, fig. 7 shows a hardware architecture block diagram of a micro-service scheduling device, and referring to fig. 7, the hardware architecture of the micro-service scheduling device may include: at least one processor 01, at least one communication interface 02, at least one memory 03 and at least one communication bus 04.
In the embodiment of the present application, the number of the processor 01, the communication interface 02, the memory 03 and the communication bus 04 is at least one, and the processor 01, the communication interface 02 and the memory 03 complete communication with each other through the communication bus 04.
The processor 01 may be a central processing unit CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement embodiments of the present application, or the like.
The memory 03 may include a high-speed RAM memory, and may further include a nonvolatile memory (non-volatile memory) or the like, such as at least one magnetic disk memory.
The memory stores a program, and the processor can call the program stored in the memory, and the program is used for executing the following micro-service scheduling method, which comprises the following steps:
responding to a request instruction for scheduling each micro-service in a service cluster, and selecting a target computing node from each computing node in the service cluster;
deploying a target controller acquired in advance on the target computing node to obtain an independent computing node;
transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
Alternatively, the refinement function and the extension function of the program may refer to the description of the scheduling method of the micro service in the method embodiment.
The embodiment of the application also provides a storage medium, which can store a program suitable for being executed by a processor, and when the program runs, the device in which the storage medium is controlled to execute the following micro-service scheduling method, comprising the following steps:
responding to a request instruction for scheduling each micro-service in a service cluster, and selecting a target computing node from each computing node in the service cluster;
deploying a target controller acquired in advance on the target computing node to obtain an independent computing node;
transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
In particular, the storage medium may be a computer-readable storage medium, which may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM.
Alternatively, the refinement function and the extension function of the program may refer to the description of the scheduling method of the micro service in the method embodiment.
In addition, functional modules in various embodiments of the present disclosure may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion. The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a live device, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present disclosure.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for scheduling micro-services, comprising:
responding to a request instruction for scheduling each micro-service in a service cluster, and selecting a target computing node from each computing node in the service cluster;
deploying a target controller acquired in advance on the target computing node to obtain an independent computing node;
transmitting each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
2. The method of claim 1, wherein the process of determining the class of each micro-service by the independent computing node comprises:
determining call information between every two micro services, and combining the call information into a call information set;
performing dimension reduction on the call information set to obtain a two-dimensional data set corresponding to the call relation set;
and clustering the two-dimensional data sets to obtain the category of each micro service.
3. The method of claim 1, wherein the process of determining the first service value for each micro-service by the independent computing node comprises:
for each micro-service, acquiring each processor value corresponding to the micro-service in a first preset time period;
taking the average value of each processor value as the minimum value of the processor corresponding to the micro service;
the processor minimum value is taken as a first service value of the micro service.
4. The method of claim 1, wherein the process of determining the second service value for each micro-service by the independent computing node comprises:
for each micro-service, acquiring each memory value corresponding to the micro-service in a first preset time period;
taking the average value of each memory value as the minimum memory value corresponding to the micro service;
and taking the memory minimum value as a second service value of the micro service.
5. The method of claim 1, wherein the sending each micro-service to each computing node other than the independent computing node based on the class of each micro-service, the first service value, and the second service value comprises:
for each category, taking each micro service with the same category as each soft affinity service corresponding to the category;
combining each soft parent service corresponding to the category into a micro service group corresponding to the category;
determining a response node corresponding to the micro service group from each computing node except the independent computing node based on the first service value and the second service value of each soft affinity service in the micro service group;
and sending the micro service group to the response node.
6. The method of claim 2, wherein determining call information between each two micro-services and combining into a call information set comprises:
judging whether a first service corresponding to each micro service exists in the independent computing node or not according to each micro service;
if a first service corresponding to the micro service exists in the independent computing node, acquiring first calling information of the first service;
determining the calling relationship between the micro service and other micro services based on the first calling information;
and integrating the calling relationship between each micro service and other micro services to obtain the calling information set.
7. The method of claim 1, wherein the target controller is a MutatingAdmission webhooks admission controller.
8. A micro-service scheduling apparatus, comprising:
the target computing node selection module is used for responding to a request instruction for scheduling each micro service in the service cluster and selecting a target computing node from all computing nodes in the service cluster;
the deployment module is used for deploying the target controller acquired in advance on the target computing node to obtain an independent computing node;
the parameter determining module is used for sending each micro-service to the independent computing node so that the independent computing node can determine the category, the first service value and the second service value of each micro-service;
and the sending module is used for sending each micro service to each computing node except the independent computing node based on the category, the first service value and the second service value of each micro service so as to complete the scheduling process of each micro service.
9. A micro-service scheduling device, comprising a memory and a processor;
the memory is used for storing programs;
the processor being configured to execute the program to implement the steps of the micro-service scheduling method according to any one of claims 1-7.
10. A storage medium having stored thereon a computer program, which, when executed by a processor, implements the steps of the micro-service scheduling method according to any one of claims 1-7.
CN202310610435.7A 2023-05-26 2023-05-26 Micro-service scheduling method, device, equipment and storage medium Pending CN116647599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310610435.7A CN116647599A (en) 2023-05-26 2023-05-26 Micro-service scheduling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310610435.7A CN116647599A (en) 2023-05-26 2023-05-26 Micro-service scheduling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116647599A true CN116647599A (en) 2023-08-25

Family

ID=87639353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310610435.7A Pending CN116647599A (en) 2023-05-26 2023-05-26 Micro-service scheduling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116647599A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117978554A (en) * 2024-04-01 2024-05-03 浪潮通用软件有限公司 Configuration-based micro-service isolation operation method, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117978554A (en) * 2024-04-01 2024-05-03 浪潮通用软件有限公司 Configuration-based micro-service isolation operation method, device and medium

Similar Documents

Publication Publication Date Title
CN108243044B (en) Service deployment method and device
CN111880936B (en) Resource scheduling method, device, container cluster, computer equipment and storage medium
US10652360B2 (en) Access scheduling method and apparatus for terminal, and computer storage medium
CN113127192B (en) Method, system, device and medium for sharing same GPU by multiple services
CN110162388A (en) A kind of method for scheduling task, system and terminal device
CN107205030B (en) Server resource scheduling method and system
CN111770162B (en) Network bandwidth limiting method, device, master node and storage medium
WO2021115054A1 (en) Method for adjusting node configuration in cluster system, and server
CN112231054B (en) Multi-model inference service deployment method and device based on k8s cluster
CN111447143B (en) Business service data transmission method and device, computer equipment and storage medium
CN116647599A (en) Micro-service scheduling method, device, equipment and storage medium
CN112631758A (en) Edge computing resource scheduling method, device and equipment and readable storage medium
EP4296820A1 (en) Instance deployment method and apparatus, cloud system, computing device, and storage medium
CN114610474A (en) Multi-strategy job scheduling method and system in heterogeneous supercomputing environment
CN111459676B (en) Node resource management method, device and storage medium
CN113055199B (en) Gateway access method and device and gateway equipment
CN111338750A (en) Pressure adjusting method and device for execution node, server and storage medium
CN112631680B (en) Micro-service container scheduling system, method, device and computer equipment
CN109413117B (en) Distributed data calculation method, device, server and computer storage medium
CN113763043A (en) Advertisement landing page display method and device, storage medium and computer equipment
CN117674957A (en) Scheduling method, scheduling apparatus, computer device, storage medium, and program product
CN106874108A (en) Thin cloud is minimized in mobile cloud computing use number technology
CN107423131B (en) Sharing method and server
CN111309467B (en) Task distribution method and device, electronic equipment and storage medium
CN115904708A (en) AI platform dynamic weighting scheduling method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240313

Address after: Unit 1, Building 1, China Telecom Zhejiang Innovation Park, No. 8 Xiqin Street, Wuchang Street, Yuhang District, Hangzhou City, Zhejiang Province, 311100

Applicant after: Tianyi Shilian Technology Co.,Ltd.

Country or region after: China

Address before: Room 1423, No. 1256 and 1258, Wanrong Road, Jing'an District, Shanghai 200072

Applicant before: Tianyi Digital Life Technology Co.,Ltd.

Country or region before: China