CN116263715A - Automatic scaling system and method for cloud native intelligent typesetting service - Google Patents

Automatic scaling system and method for cloud native intelligent typesetting service Download PDF

Info

Publication number
CN116263715A
CN116263715A CN202211658259.6A CN202211658259A CN116263715A CN 116263715 A CN116263715 A CN 116263715A CN 202211658259 A CN202211658259 A CN 202211658259A CN 116263715 A CN116263715 A CN 116263715A
Authority
CN
China
Prior art keywords
service
resource
request
container
resources
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
CN202211658259.6A
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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202211658259.6A priority Critical patent/CN116263715A/en
Publication of CN116263715A publication Critical patent/CN116263715A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • 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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an automatic scaling system and method for cloud native intelligent typesetting service, wherein the system comprises a main resource scheduler: the system is used for receiving the service request, judging whether the current cluster resources are sufficient or not, automatically scaling and carrying out staged distribution on the service request; from the resource scheduler: for receiving periodically distributed service requests, determining whether resources within a locally serviced container are sufficient and automatically scaling, and feeding back the request results and resource usage to the master resource scheduler. The method predicts the service deployment mode by using a planning algorithm, predicts whether the service deployment mode can cause overlong service response by using a searching algorithm, reasonably and efficiently uses cloud resources while ensuring service completion timeliness, and combines the method with the deployed service to carry out targeted automatic deployment on the micro service under the conditions of known micro service flow and estimated resource consumption and service duration, and simultaneously considers the utilization rate of the cloud resources to timely reduce or expand the cloud resources.

Description

Automatic scaling system and method for cloud native intelligent typesetting service
Technical Field
The invention relates to the technical field of cloud computing, in particular to an automatic scaling system and method for cloud native intelligent typesetting service.
Background
Cloud computing provides access to a broad set of servers, storage, databases, and application services over the internet. Cloud service providers provide cloud services, such as web services, and business applications that are hosted in servers of one or more data centers that are accessible to a company or individual over the internet. Very large scale cloud service providers typically have hundreds of thousands of servers. Splitting the program into microservices runs on a cloud server, deploys the microservices using containerization, e.g., dock, and manages the microservices using containerization, e.g., k8 s. The way k8s itself owns the depoyment and auto-scaling is for the deployment itself and is not associated with the deployed service. In deploying a service, multiple deployments may occur because the randomly matched machine resources are insufficient to cause the service deployment to fail. The service scheduling is not performed according to the priority order of the service, which often results in too long response time of the server. Because of service independence, k8s also does not efficiently deploy services and utilize cloud resources.
Disclosure of Invention
The invention provides an automatic scaling system and method for cloud native intelligent typesetting service, which aims to solve the problems that in the prior art, when service is deployed, service deployment fails due to insufficient machine resources which are randomly matched, multiple deployments are performed, and the utilization efficiency of cloud resources is unreasonable.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
an automatic scaling system for cloud native intelligent typesetting service comprises a main resource scheduler: the system is used for receiving the service request, judging whether the current cluster resources are sufficient or not, automatically scaling and carrying out staged distribution on the service request; from the resource scheduler: for receiving periodically distributed service requests, determining whether resources within a locally serviced container are sufficient and automatically scaling, and feeding back the request results and resource usage to the master resource scheduler. The method predicts the service deployment mode by using a planning algorithm, predicts whether the service deployment mode can cause overlong service response by using a searching algorithm, reasonably and efficiently uses cloud resources while ensuring service completion timeliness, and combines the method with the deployed service, performs targeted automatic deployment on the micro-service under the conditions of dag flow charts of the known micro-service and predicted resource consumption and service duration, and simultaneously considers the utilization rate of the cloud resources to timely reduce or expand the cloud resources.
As a preferred embodiment of the present invention, the primary resource scheduler includes: and a service type judging module: the method comprises the steps of judging the request type and determining the service flow, endowing the request with a unique ID, initializing a service flow record file and sending the request ID to a request distribution module; service distribution module: after receiving the request ID, sending a resource query request to a cluster resource management module, and searching for an optimal slave resource scheduler distribution service request in the cluster; cluster resource management module: recording all resources of the cluster, and updating the number of available and occupied resources according to feedback from a resource scheduler; receiving a resource query request and returning the number of available resources; receiving a cluster resource increasing request, sending a resource increasing request to a cloud platform, and returning a successful resource increase or incapability of increasing the resource after receiving feedback of the cloud platform; and after a certain time when the resource query request is not received, checking the number of available and occupied resources, and sending a resource reduction request to the cloud platform.
As a preferred embodiment of the present invention, the slave resource scheduler includes: the container service module: receiving a service request, checking whether a container for completing corresponding service exists locally, if not, starting a new container, if so, sending a resource inquiry request to a container resource management module, checking whether the container is allocated with enough resources, if so, sending a task to the container, sending resource occupation information to the container resource management module, and sending resource occupation relieving information after receiving the feedback of the container; container resource management module: recording all resources in the slave resource scheduler, receiving a resource inquiry request, returning the number of resources allocated to the container, updating the total number of available and occupied resources in the slave resource scheduler according to the feedback of the container service module, and sending statistical information to the master resource scheduler.
An automatic scaling method for cloud native intelligent typesetting service comprises the following steps: s1: the main resource dispatcher receives a service request of a user, determines a service flow according to the request type, and counts the estimated resource consumption and cluster idle resources of the request; s2: if the estimated resource consumption is smaller than the cluster idle resource, directly executing S3, otherwise, sending a cluster resource increasing request to a cluster resource management module, and then executing S3; s3: the service type judging module initializes a service flow record file, selects an optimal slave resource scheduler according to the counted estimated resource consumption, allocates resources to the optimal slave resource scheduler after the cluster resource request is increased successfully, receives a service request from the resource scheduler, and the container service module adds the request into a service request list; s4: checking whether a container for completing the corresponding service exists locally, if so, sending a resource query request to a container resource management module and directly executing the step S7, and if not, starting a new container and executing the step S5; s5: checking whether the container has idle resources to meet various resource requirements of the service in the service set, if so, directly executing S6, if not, carrying out container resource adjustment, distributing the service set to each container, updating a resource table of a container resource management module, and requesting the cluster resource management module to update the resource occupation of a slave resource scheduler after statistics; s6: after the container finishes the staged service, writing the return value into a service flow record file and sending a request ID to a container service module, updating a resource table of a container resource management module by the container service module according to the container service type and the container name, relieving the occupation of resources, and returning to the execution S4; s7: and the container service module completes the request and returns an execution result to the user, and the process is ended. According to the cloud native intelligent typesetting service-oriented automatic scaling method, a planning algorithm is utilized to predict a service deployment mode, a search algorithm is utilized to predict whether the service deployment mode can cause overlong service response, cloud resources are reasonably and efficiently used while service completion timeliness is guaranteed, and the cloud native intelligent typesetting service-oriented automatic scaling method is combined with deployed services, performs targeted automatic deployment on micro services under the conditions of dag flow charts of known micro services and predicted resource consumption and service duration, and simultaneously considers the utilization rate of the cloud resources to timely reduce or expand the cloud resources.
As a preferred embodiment of the present invention, the S1 specifically is: after receiving a service request of a user, a service type judging module judges the type of the request according to a request type dictionary, determines a service flow required by the request, counts estimated resource consumption of the request according to a service resource consumption dictionary, and inquires cluster resource statistical information from a cluster resource management module to obtain cluster idle resources.
As a preferred scheme of the invention, after the request for adding the cluster resources is sent to the cluster resource management module in the S2, if no reply is received or the request for adding the cluster resources can not be added or the request for adding the cluster resources is successful within a certain time, the S3 is continuously executed.
As a preferred embodiment of the present invention, the S3 specifically is: the service type judging module generates the ID of the request and initializes the service flow record file of the request, sends the request ID to the request distributing module, the request distributing module inquires the slave resource scheduler with the maximum available various resources in the cluster resource management module according to the counted estimated resource consumption, namely the optimal slave resource scheduler, the cluster resource management module returns the address of the slave resource scheduler, if the cluster resource management module receives the feedback of the request for adding the resource sent by the cloud platform, the cluster resource management module distributes the resource to the optimal slave resource scheduler, even if the request for adding the resource fails, the address of the slave resource scheduler is returned, the service request is received from the resource scheduler, the container service module adds the request to the service request list, and the request result is returned to the client after the request ID is fed back from the slave resource scheduler.
As a preferred solution of the present invention, the checking in S4 whether there is a container for completing the corresponding service locally specifically includes: finding the first service without return value of each request of the service request list when task allocation is performed each time, obtaining a single-allocation service set list by integer programming under the condition that the existing idle resources from a resource scheduler and the idle resources used as much as possible are not exceeded, predicting whether each service set can cause a certain request to have excessively long final response time by using a tree search method, selecting an optimal service set, and checking whether a container for completing corresponding service is locally available according to a container service dictionary.
As a preferred scheme of the invention, after the resource table of the container resource management module finishes the operation of relieving the occupation of resources, the available amount and occupation amount of various resources owned by the slave resource scheduler are counted, the resource information of the slave resource scheduler in the cluster resource management module is requested to be updated, when the container resource management module does not receive the request of relieving the occupation of resources within a set time, the available amount and occupation amount of various resources owned by the slave resource scheduler are counted, and when the available amount of various resources is larger than the set value, the cluster resource management module is requested to reduce various resources of the slave resource scheduler.
Therefore, the invention has the following beneficial effects: according to the cloud primary intelligent typesetting service-oriented automatic scaling system and method, a planning algorithm is utilized to predict a service deployment mode, a search algorithm is utilized to predict whether the service deployment mode can cause overlong service response, cloud resources are reasonably and efficiently used while service completion timeliness is guaranteed, and the cloud primary intelligent typesetting service-oriented automatic scaling system and method are combined with deployed services to conduct targeted automatic deployment on micro services under the conditions of dag flow charts of known micro services and predicted resource consumption and service duration, and meanwhile the utilization rate of the cloud resources is considered, so that cloud resources are timely reduced or expanded.
Drawings
FIG. 1 is a schematic diagram of the system architecture of the present invention;
FIG. 2 is a flow chart of the method of the present invention;
FIG. 3 is a flow chart of a method of an embodiment of the present invention;
FIG. 4 is a flow chart of a request reduction slave resource scheduler according to an embodiment of the present invention.
In the figure, 1, a master resource scheduler; 2. a slave resource scheduler; 3. a service type judging module; 4. a service distribution module; 5. a cluster resource management module; 6. a container service module; 7. and a container resource management module.
Detailed Description
The invention is further described below with reference to the drawings and detailed description.
As shown in fig. 1, an automatic scaling system for cloud native intelligent typesetting service includes a main resource scheduler 1: the system is used for receiving the service request, judging whether the current cluster resources are sufficient or not, automatically scaling and carrying out staged distribution on the service request; from resource scheduler 2: for receiving the periodically distributed service requests, judging whether the resources in the container for locally providing the service are sufficient and automatically scaling, and feeding back the request result and the resource use condition to the master resource scheduler 1.
The master resource scheduler 1 includes: service type judging module 3: the method comprises the steps of judging the request type and determining the service flow, endowing the request with a unique ID, initializing a service flow record file and sending the request ID to a request distribution module; service distribution module 4: after receiving the request ID, sending a resource query request to the cluster resource management module 5, and searching for an optimal slave resource scheduler 2 in the cluster to distribute a service request; cluster resource management module 5: recording all resources of the cluster, and updating the number of available and occupied resources according to feedback from the resource scheduler 2; receiving a resource query request and returning the number of available resources; receiving a cluster resource increasing request, sending a resource increasing request to a cloud platform, and returning a successful resource increase or incapability of increasing the resource after receiving feedback of the cloud platform; and after a certain time when the resource query request is not received, checking the number of available and occupied resources, and sending a resource reduction request to the cloud platform.
The slave resource scheduler 2 includes: container service module 6: receiving a service request, checking whether a container which completes corresponding service exists locally, if not, starting a new container, if so, sending a resource inquiry request to a container resource management module 7, checking whether the container is allocated with enough resources, if so, sending a task to the container, sending resource occupation information to the container resource management module 7, and sending resource unoccupied information after receiving container feedback; container resource management module 7: all the resources in the slave resource scheduler 2 are recorded, a resource inquiry request is received, the number of resources allocated to the container is returned, the total number of available and occupied resources in the slave resource scheduler 2 is updated according to the feedback of the container service module 6, and statistical information is sent to the master resource scheduler 1.
As shown in fig. 2, an automatic scaling method for cloud native intelligent typesetting service includes the following steps:
s1: the main resource dispatcher receives a service request of a user, determines a service flow according to the request type, and counts the estimated resource consumption and cluster idle resources of the request; s1 specifically comprises the following steps: after receiving a service request of a user, a service type judging module judges the type of the request according to a request type dictionary, determines a service flow required by the request, counts estimated resource consumption of the request according to a service resource consumption dictionary, and inquires cluster resource statistical information from a cluster resource management module to obtain cluster idle resources.
S2: if the estimated resource consumption is smaller than the cluster idle resource, directly executing S3, otherwise, sending a cluster resource increasing request to a cluster resource management module, and then executing S3; and S3, after the cluster resource adding request is sent to the cluster resource management module in S2, if the reply is not received or the cluster resource can not be added or the cluster resource adding request is successful within a certain time, continuing to execute the S3.
S3: the service type judging module initializes a service flow record file, selects an optimal slave resource scheduler according to the counted estimated resource consumption, allocates resources to the optimal slave resource scheduler after the cluster resource request is increased successfully, receives a service request from the resource scheduler, and the container service module adds the request into a service request list; s3 specifically comprises the following steps: the service type judging module generates the ID of the request and initializes the service flow record file of the request, sends the request ID to the request distributing module, the request distributing module inquires the slave resource scheduler with the maximum available various resources in the cluster resource management module according to the counted estimated resource consumption, namely the optimal slave resource scheduler, the cluster resource management module returns the address of the slave resource scheduler, if the cluster resource management module receives the feedback of the request for adding the resource sent by the cloud platform, the cluster resource management module distributes the resource to the optimal slave resource scheduler, even if the request for adding the resource fails, the address of the slave resource scheduler is returned, the service request is received from the resource scheduler, the container service module adds the request to the service request list, and the request result is returned to the client after the request ID is fed back from the slave resource scheduler.
S4: checking whether a container for completing the corresponding service exists locally, if so, sending a resource query request to a container resource management module and directly executing the step S7, and if not, starting a new container and executing the step S5; s4, checking whether a container for completing the corresponding service locally is specifically: finding the first service without return value of each request of the service request list when task allocation is performed each time, obtaining a single-allocation service set list by integer programming under the condition that the existing idle resources from a resource scheduler and the idle resources used as much as possible are not exceeded, predicting whether each service set can cause a certain request to have excessively long final response time by using a tree search method, selecting an optimal service set, and checking whether a container for completing corresponding service is locally available according to a container service dictionary.
S5: checking whether the container has idle resources to meet various resource requirements of the service in the service set, if so, directly executing S6, if not, carrying out container resource adjustment, distributing the service set to each container, updating a resource table of a container resource management module, and requesting the cluster resource management module to update the resource occupation of a slave resource scheduler after statistics;
s6: after the container finishes the staged service, writing the return value into a service flow record file and sending a request ID to a container service module, updating a resource table of a container resource management module by the container service module according to the container service type and the container name, relieving the occupation of resources, and returning to the execution S4;
s7: and the container service module completes the request and returns an execution result to the user, and the process is ended.
After the resource table of the container resource management module finishes the operation of relieving the occupation of the resources, the available amount and occupation amount of various resources owned by the slave resource scheduler are counted, the resource information of the slave resource scheduler in the cluster resource management module is requested to be updated, when the container resource management module does not receive the request of relieving the occupation of the resources within a set time, the available amount and occupation amount of various resources owned by the slave resource scheduler are counted, and when the available amount of various resources is larger than the set value, various resources of the slave resource scheduler are requested to be reduced from the cluster resource management module.
The invention has the following beneficial effects: according to the cloud native intelligent typesetting service-oriented automatic scaling method, a planning algorithm is utilized to predict a service deployment mode, a search algorithm is utilized to predict whether the service deployment mode can cause overlong service response, cloud resources are reasonably and efficiently used while service completion timeliness is guaranteed, and the cloud native intelligent typesetting service-oriented automatic scaling method is combined with deployed services, performs targeted automatic deployment on micro services under the conditions of dag flow charts of known micro services and predicted resource consumption and service duration, and simultaneously considers the utilization rate of the cloud resources to timely reduce or expand the cloud resources.
In this embodiment, the automatic scaling system and the method for the cloud native intelligent typesetting service are described in detail.
As shown in fig. 1, an automatic scaling system for cloud native intelligent typesetting service comprises a main resource scheduler for receiving service requests, judging whether current cluster resources are sufficient and automatically scaling, and periodically distributing the service requests; the slave resource scheduler is used for receiving the service requests distributed in a staged mode, judging whether the resources in the container for providing the service locally are sufficient or not and automatically scaling, and feeding back the request result and the resource use condition to the master resource scheduler.
The master resource scheduler includes: the service type judging module is used for judging the request type and determining the service flow, endowing the request with a unique ID, initializing a service flow record file and sending the request ID to the request distributing module; the service distribution module is used for sending a resource query request to the cluster resource management module after receiving the request ID, and searching for an optimal slave resource scheduler distribution service request in the cluster; and the cluster resource management module is used for recording all resources of the cluster and updating the number of available and occupied resources according to feedback from the resource scheduler. And receiving a resource query request and returning the number of available resources. And receiving a cluster resource increasing request, sending the resource increasing request to the cloud platform, and returning the successful or unable resource increasing after receiving the feedback of the cloud platform. And after a certain time when the resource query request is not received, checking the number of available and occupied resources, and sending a resource reduction request to the cloud platform.
The slave resource scheduler includes: the container service module is used for receiving the service request, checking whether a container which completes the corresponding service exists locally, if not, starting a new container, if so, sending a resource inquiry request to the container resource management module, checking whether the container is allocated with enough resources, if so, sending a task to the container, sending resource occupation information to the container resource management module, and sending resource occupation relieving information after receiving the feedback of the container; and the container resource management module records all resources in the slave resource scheduler, receives a resource query request, returns the allocated resource number of the container, updates the total resource number available and occupied in the slave resource scheduler according to the feedback of the container service module and sends statistical information to the master resource scheduler.
As shown in fig. 3 and fig. 4, the automatic scaling method for cloud native intelligent typesetting service specifically comprises the following steps:
step 1: after receiving a service request of a user, a service type judging module judges the type of the request according to a request type dictionary, determines which service processes are needed for the request, calculates estimated resource consumption of the request according to a service resource consumption dictionary, inquires cluster resource statistical information from a cluster resource management module, and if the available amount of various resources is larger than the estimated resource consumption, carries out the next step, if the available amount of various resources is smaller than the estimated resource consumption, sends a request for increasing cluster resources (the increased amount of various resources of the cluster is the difference value of the two plus a set redundancy value) to the cluster resource management module, and if no answer is received or the resources cannot be increased or the success of the resource increase is received within a certain time, continues to carry out the next step.
Variables and formula examples:
request type dictionary: { request 1: [ service A, service B, service C ],
request 2: [ service D, service E ], … … };
service resource consumption dictionary: { service a: { CPU:2, memory: 3, running time: 5}, service B: { CPU:1, memory: 4, running time: 2}, service C: { CPU:3, memory: 2, run time: 3, … … };
and (3) counting resource consumption: request 1: { CPU: and 6, memory: 9};
if the cluster idle resources are counted as follows: { CPU:8, memory: 6, adding cluster resource request as { memory }: 3+Δ }, Δ being the set redundancy value.
Step 2: the service type judging module generates the ID of the request, initializes the service flow record file of the request and sends the request ID to the request distributing module, the request distributing module inquires the slave resource dispatcher with the most available various resources in the cluster resource management module according to the counted estimated resource consumption, the cluster resource management module returns the address of the slave resource dispatcher, if the cluster resource management module receives the feedback of the resource increasing request sent by the cloud platform, the cluster resource management module distributes the resource to the optimal slave resource dispatcher, and even if the resource increasing request fails, the slave resource dispatcher address is returned. The request ID is fed back from the resource scheduler, and the request result is returned to the client.
Variables and formula examples:
service flow record file: { request id: XXX, service flow: [ { service a: return value, service time: XX } { service B: return value, service time: XX, … ] };
service time = run time + wait time;
searching an optimal slave resource scheduler: and (3) counting resource consumption: { CPU: and 6, memory: 9};
idle resources from the resource scheduler 1: { CPU:4, memory: 8};
idle resources from the resource scheduler 2: { CPU:3, memory: 10};
score from resource scheduler 1: 6*4/9+8 =10.67;
score from resource scheduler 2: 6*3/9+10=12 >10.67;
the slave resource scheduler 2 is the optimal slave resource scheduler.
Step 3: after receiving service requests from a resource scheduler, a container service module uniformly plans the service request list, finds the first service without return value of each request of the service request list when each task is allocated, obtains a single allocated service set list by using integer planning under the condition that the existing free resources of the resource scheduler and the free resources used as much as possible are not exceeded, predicts whether each service set can cause overlong final response time of a certain request by using a tree search method, selects an optimal service set, checks whether a container for completing corresponding service locally according to a container service dictionary, starts a new container if the container is not available, sends a resource query request to a container resource management module if the container is available, checks whether the container is available to meet various resource requirements of the service in the service set, allocates the service set to each container if the container is not available, updates the resource table (various resource occupation amounts of each container) of the container resource management module, counts the resource occupation of the cluster resource management module, writes a return value into a service record file after the container is completed, sends an ID (identity) to the container service record file, if the container is available, periodically allocates the container resource occupation of the container according to the container service module, and periodically allocates the resource occupation of the container to the container service module.
Variables and formula examples:
service request list: { request id1: [ { service a: return value } { service B: } … ], request id1: [ { service B: { service C: - …, … };
container service dictionary: { service a: container name 1, service B: vessel name 2, … };
list of service sets: [ [2 services a,3 services B,4 services C, … ], [1 service a,2 services B,3 services C, … ], … ];
integer programming:
x1 x a (cpu consumption) +y1 x B (cpu consumption) + … < = number of idle cpus from the resource scheduler;
x2 x a (memory consumption) +y2 x B (memory consumption) + … < = free memory from resource scheduler, and the total cpu consumption and total memory consumption are required to be as large as possible.
Tree search prediction: let current allocation [1 service a,2 service B,3 service C, … ];
the next time it is possible to allocate [0 services a,4 services B,2 services C, … ] …;
request X: service a, service B, service C, … all services are finally completed through K allocations, total service time = a (service time) +b (service time) + … (expected total service time for each request);
traversing and predicting all planned service sets, and finding the service set with the minimum request number exceeding the expected total service time as an optimal set;
service time calculation: request X: [ service a, service B, service C, … ];
a (service time) =time when a is completed-time when request X joins the service request list;
b (service time) =time of B completion-time of a completion;
dynamically adjusting container resources: let current allocation [1 service a,2 service B,3 service C, … ];
{ Container name 1: { Idle cpu:0, free memory: 0, …;
then increase: { Container name 1: { cpu:2, memory: 3, …).
Step 4: after the resource table of the container resource management module finishes the operation of relieving the occupation of the resources, the available amount and occupation amount of various resources owned by the slave resource scheduler are counted, and the resource information of the slave resource scheduler in the cluster resource management module is requested to be updated. And when the available amount of all kinds of resources is larger than a certain value, requesting the cluster resource management module to reduce all kinds of resources of the slave resource scheduler.
Variables and formula examples:
dynamically curtailing resources: setting: { service a: { CPU:2, memory: 3, running time: 5}, service B: { CPU:1, memory: 4, running time: 2}, service C: { CPU:3, memory: 2, run time: 3 };
from resource scheduler 1 resource: { CPU: { occupied: 6, idle: 4}, memory: { occupied: 8, idle: 6 };
if the idle number of the CPU is always more than 3 and the memory number is always more than 4 in the set time of the slave resource scheduler 1, the slave resource scheduler resource is applied to the cluster resource management module, and the resource amount is reduced to { CPU:1, memory: 2}.
Tree search procedure example:
service resource consumption dictionary: { service a: { CPU:2, memory: 3, running time: 5}, service B: { CPU:1, memory: 4, running time: 2}, service C: { CPU:3, memory: 2, run time: 3, … … };
service request list: {
Request 1: [ { service a: return value } { service B: return value } { service C: } { service D: }],
request 2: [ { service a: return value } { service B: { service C: } { service D: }],
request 3: [ { service B: { service C: } { service D: }],
request 4: [ { service a: { service B: { service C: } { service D: }],
request 5: [ { service C: } { service D: }],
request 6: [ { service a: { service B: { service C: }],
request 7: [ { service B: { service C: ],
request 8: [ { service a: { service B: { service C: }]}.
The current service requests 3 a services ( requests 4,6, 8), 3B services ( requests 2,3, 7), and 2C services (requests 1, 5).
Planned service set list: [ [1 service A,1 service B,2 service C ], [2 service A,1 service B,0 service C ], [3 service A,0 service B,0 service C ] … ].
Tree search process: assuming that a [2 services a,1 service B,0 service C ] service set is selected, which is the root of the tree search, 2 services a may be requests 4,6, requests 4, 8, requests 6,8, and three choices of B services make up 9 possible combinations, then there are nine new current service requests. The next possible service set (subtree) is an internal permutation and combination of nine new current service requests, and the permutation and combination is constrained to be that the number of resources does not exceed the number of resources existing in the cluster. Every layer of the tree is added, the service time of the selected service in the service set is increased by the running time value recorded by the service resource consumption dictionary, and all other services without return values are added with a set average service time value. And so on until no return value service is selected in all requests in the list of service requests. The tree search reaches the leaf node. During the searching process, each layer calculates the service time of each request, and once the service time of a certain request exceeds the set longest service time, the searching is stopped to return to the father node. Finally, it is counted whether the search tree with [2 service A,1 service B,0 service C ] service set as the root has leaf nodes or not, and there are several leaf nodes.
The foregoing is merely illustrative of specific embodiments of the present invention, and the scope of the present invention is not limited thereto, but any changes or substitutions that do not undergo the inventive effort should be construed as falling within the scope of the present invention.

Claims (9)

1. An automatic scaling system for cloud native intelligent typesetting service is characterized by comprising:
a master resource scheduler: the system is used for receiving the service request, judging whether the current cluster resources are sufficient or not, automatically scaling and carrying out staged distribution on the service request;
from the resource scheduler: for receiving periodically distributed service requests, determining whether resources within a locally serviced container are sufficient and automatically scaling, and feeding back the request results and resource usage to the master resource scheduler.
2. The automatic scaling system for cloud native intelligent typesetting service of claim 1, wherein the master resource scheduler comprises:
and a service type judging module: the method comprises the steps of judging the request type and determining the service flow, endowing the request with a unique ID, initializing a service flow record file and sending the request ID to a request distribution module;
service distribution module: after receiving the request ID, sending a resource query request to a cluster resource management module, and searching for an optimal slave resource scheduler distribution service request in the cluster;
cluster resource management module: recording all resources of the cluster, and updating the number of available and occupied resources according to feedback from a resource scheduler; receiving a resource query request and returning the number of available resources; receiving a cluster resource increasing request, sending a resource increasing request to a cloud platform, and returning a successful resource increase or incapability of increasing the resource after receiving feedback of the cloud platform; and after a certain time when the resource query request is not received, checking the number of available and occupied resources, and sending a resource reduction request to the cloud platform.
3. An automatic scaling system for cloud-oriented intelligent typesetting services according to claim 1 or 2, wherein said slave resource scheduler comprises:
the container service module: receiving a service request, checking whether a container for completing corresponding service exists locally, if not, starting a new container, if so, sending a resource inquiry request to a container resource management module, checking whether the container is allocated with enough resources, if so, sending a task to the container, sending resource occupation information to the container resource management module, and sending resource occupation relieving information after receiving the feedback of the container;
container resource management module: recording all resources in the slave resource scheduler, receiving a resource inquiry request, returning the number of resources allocated to the container, updating the total number of available and occupied resources in the slave resource scheduler according to the feedback of the container service module, and sending statistical information to the master resource scheduler.
4. An automatic scaling method for cloud-oriented intelligent typesetting service, which is applicable to the automatic scaling system for cloud-oriented intelligent typesetting service as claimed in any one of claims 1-3, and is characterized by comprising the following steps:
s1: the main resource dispatcher receives a service request of a user, determines a service flow according to the request type, and counts the estimated resource consumption and cluster idle resources of the request;
s2: if the estimated resource consumption is smaller than the cluster idle resource, directly executing S3, otherwise, sending a cluster resource increasing request to a cluster resource management module, and then executing S3;
s3: the service type judging module initializes a service flow record file, selects an optimal slave resource scheduler according to the counted estimated resource consumption, allocates resources to the optimal slave resource scheduler after the cluster resource request is increased successfully, receives a service request from the resource scheduler, and the container service module adds the request into a service request list to plan;
s4: checking whether a container for completing the corresponding service exists locally, if so, sending a resource query request to a container resource management module and directly executing the step S7, and if not, starting a new container and executing the step S5;
s5: checking whether the container has idle resources to meet various resource requirements of the service in the service set, if so, directly executing S6, if not, carrying out container resource adjustment, distributing the service set to each container, updating a resource table of a container resource management module, and requesting the cluster resource management module to update the resource occupation of a slave resource scheduler after statistics;
s6: after the container finishes the staged service, writing the return value into a service flow record file and sending a request ID to a container service module, updating a resource table of a container resource management module by the container service module according to the container service type and the container name, relieving the occupation of resources, and returning to the execution S4;
s7: and the container service module completes the request and returns an execution result to the user, and the process is ended.
5. The automatic scaling method for cloud native intelligent typesetting service according to claim 4, wherein the step S1 is specifically: after receiving a service request of a user, a service type judging module judges the type of the request according to a request type dictionary, determines a service flow required by the request, counts estimated resource consumption of the request according to a service resource consumption dictionary, and inquires cluster resource statistical information from a cluster resource management module to obtain cluster idle resources.
6. The method for automatically scaling cloud-oriented intelligent typesetting services according to claim 4, wherein after the request for adding the cluster resources is sent to the cluster resource management module in S2, if no reply is received or no cluster resource can be added or the request for adding the cluster resources is received successfully within a certain time, S3 is continuously executed.
7. The automatic scaling method for cloud native intelligent typesetting service according to claim 4, wherein the step S3 is specifically: the service type judging module generates the ID of the request and initializes the service flow record file of the request, sends the request ID to the request distributing module, the request distributing module inquires the slave resource scheduler with the maximum available various resources in the cluster resource management module according to the counted estimated resource consumption, namely the optimal slave resource scheduler, the cluster resource management module returns the address of the slave resource scheduler, if the cluster resource management module receives the feedback of the request for adding the resource sent by the cloud platform, the cluster resource management module distributes the resource to the optimal slave resource scheduler, even if the request for adding the resource fails, the address of the slave resource scheduler is returned, the service request is received from the resource scheduler, the container service module adds the request to the service request list, and the request result is returned to the client after the request ID is fed back from the slave resource scheduler.
8. The automatic scaling method for cloud native intelligent typesetting service according to claim 4, wherein checking whether a container for completing the corresponding service is locally in S4 is specifically: finding the first service without return value of each request of the service request list when task allocation is performed each time, obtaining a single-allocation service set list by integer programming under the condition that the existing idle resources from a resource scheduler and the idle resources used as much as possible are not exceeded, predicting whether each service set can cause a certain request to have excessively long final response time by using a tree search method, selecting an optimal service set, and checking whether a container for completing corresponding service is locally available according to a container service dictionary.
9. The automatic scaling method for cloud native intelligent typesetting service according to any one of claims 4 to 8, wherein after the resource table of the container resource management module completes the operation of releasing the occupation of resources, the available amount and occupation amount of each type of resources owned by the slave resource scheduler are counted, the resource information of the slave resource scheduler in the cluster resource management module is requested to be updated, when the container resource management module does not receive the request of releasing the occupation operation of resources within a set time, the available amount and occupation amount of each type of resources owned by the slave resource scheduler are counted, and when the available amount of each type of resources is greater than the set value, the cluster resource management module is requested to reduce each type of resources of the slave resource scheduler.
CN202211658259.6A 2022-12-22 2022-12-22 Automatic scaling system and method for cloud native intelligent typesetting service Pending CN116263715A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211658259.6A CN116263715A (en) 2022-12-22 2022-12-22 Automatic scaling system and method for cloud native intelligent typesetting service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211658259.6A CN116263715A (en) 2022-12-22 2022-12-22 Automatic scaling system and method for cloud native intelligent typesetting service

Publications (1)

Publication Number Publication Date
CN116263715A true CN116263715A (en) 2023-06-16

Family

ID=86723062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211658259.6A Pending CN116263715A (en) 2022-12-22 2022-12-22 Automatic scaling system and method for cloud native intelligent typesetting service

Country Status (1)

Country Link
CN (1) CN116263715A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700997A (en) * 2023-08-04 2023-09-05 腾讯科技(深圳)有限公司 Capacity expansion method, device and equipment of edge cloud equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700997A (en) * 2023-08-04 2023-09-05 腾讯科技(深圳)有限公司 Capacity expansion method, device and equipment of edge cloud equipment and readable storage medium
CN116700997B (en) * 2023-08-04 2024-05-07 腾讯科技(深圳)有限公司 Capacity expansion method, device and equipment of edge cloud equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11416286B2 (en) Computing on transient resources
CN110858161B (en) Resource allocation method, device, system, equipment and medium
US8656404B2 (en) Statistical packing of resource requirements in data centers
US11496413B2 (en) Allocating cloud computing resources in a cloud computing environment based on user predictability
CN110597639B (en) CPU distribution control method, device, server and storage medium
US20050132379A1 (en) Method, system and software for allocating information handling system resources in response to high availability cluster fail-over events
CN106462593B (en) System and method for massively parallel processing of databases
CN113946431B (en) Resource scheduling method, system, medium and computing device
CN114443263A (en) Video memory management method, device, equipment and system
CN116263715A (en) Automatic scaling system and method for cloud native intelligent typesetting service
CN116010064A (en) DAG job scheduling and cluster management method, system and device
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
CN112073532B (en) Resource allocation method and device
Wu et al. ABP scheduler: Speeding up service spread in docker swarm
CN113301087A (en) Resource scheduling method, device, computing equipment and medium
US20080235705A1 (en) Methods and Apparatus for Global Systems Management
CN111813564B (en) Cluster resource management method and device and container cluster management system
CN112860442A (en) Resource quota adjusting method and device, computer equipment and storage medium
CN111796932A (en) GPU resource scheduling method
CN112416538A (en) Multilayer architecture and management method of distributed resource management framework
CN116302456B (en) Meta universe computing resource scheduling system
CN117519953B (en) Separated memory management method for server-oriented non-perception calculation
US12028269B2 (en) Method for optimal resource selection based on available GPU resource analysis in large-scale container platform
US20230155958A1 (en) Method for optimal resource selection based on available gpu resource analysis in large-scale container platform
CN114390058B (en) Service management system, 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