Hybrid cloud optimization method based on cloud manufacturer cost scheduling
Technical Field
The invention relates to the field of cloud computing in the field of computers, in particular to a hybrid cloud optimization method based on cloud manufacturer cost scheduling.
Background
In the cloud computing era, various advantages brought by the cloud enable a large number of enterprises to host their own businesses in the cloud, but loss caused by failure of cloud services is difficult to control, and CIOs of many enterprises are worried about palpitations. Therefore, disaster recovery is performed by deploying the service in multiple clouds (different public clouds and private clouds) which is the most effective scheme, and the method solves many requirements under a single cloud scene for users: avoiding vendor lock-up, enhancing the business flexibility of the user;
the cloud disaster tolerance capability is realized, and the cloud single-point downtime fault is quickly dealt with;
the traffic flow is shared, and the impact of the traffic flow peak is intelligently coped with;
and the cross-region service deployment is realized, the service access region affinity is realized, and the performance is improved.
In order to enable services to be migrated rapidly, the services are generally operated in a container mode, and the container enables developers to pack their applications and dependence packages into a portable mirror image, and then the application and dependence packages are distributed to any popular Linux or Windows machine, so that virtualization can be realized; the containers are fully sandboxed without any interface between each other.
Kubernets is an open source platform for automatic container operation, one kubernets can be operated on one public cloud manufacturer, and a plurality of kubernets are deployed across a plurality of public cloud manufacturers in a container mixing cloud, so that the following purposes are achieved:
based on the unified standard of container technology, applications can be freely migrated among multiple clusters across clouds without worrying about dependence on the environment;
the second-level elasticity mechanism based on the container technology does not need to maintain additional resources for multi-cloud and mixed-cloud solutions, and the enterprise cost is not obviously increased;
the lightweight technical scheme based on the container technology has the advantages that the construction and maintenance of the cross-cloud service are simple, and the problem of a large amount of infrastructure is not required to be concerned.
A typical architecture based on a kubernets container hybrid cloud is shown in fig. 1, and at present, in the scheduling of the kubernets container hybrid cloud, the cost problem of each cloud manufacturer is not considered, for example, a cloud host in the hua cloud is cheaper than the airy cloud, or under the cloud hosts with the same specification, the actual performance of each cloud manufacturer has a certain gap; the current scheduling only considers how to rapidly expand capacity, or manually makes deployment among clouds according to the traffic of regions.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a hybrid cloud optimization method based on cloud manufacturer cost scheduling, which adopts the cloud basic resources of a plurality of public cloud manufacturers in the hybrid container cloud deployment process and solves the problem of how to efficiently and reasonably use the resources.
The technical purpose of the invention is realized by the following technical scheme:
a hybrid cloud optimization method based on cloud manufacturer cost scheduling is characterized in that a cost scheduler based on cost is newly added on the basis of an original scheduling mode, dynamic scheduling can be constructed according to the performance of servers of various cloud manufacturers through the cost scheduler, and cost is saved while functional requirements are met.
The cost scheduler mainly collects dynamic and static information, wherein the static information comprises but is not limited to the price of a virtual machine of each cloud manufacturer, the bandwidth price of each cloud manufacturer and the storage price of each cloud manufacturer; the static information is mainly input by a user or acquired by calling an interface of a cloud manufacturer.
The dynamic information includes, but is not limited to, a CPU usage rate, a memory occupancy rate, an actual bandwidth, a disk IOPS, a network request number, and the like when the collection service application runs on the virtual machine of each cloud manufacturer.
After a period of collection and arrangement, the processing capacity of the applications supported by each cloud manufacturer at the same price, such as the concurrency number of the applications, can be obtained.
Then the cost scheduler can obtain which virtual machine (cloud host) of the cloud manufacturer is selected when the access amount is small; and when the access amount is large, selecting which cloud manufacturer to deploy the application, dynamically migrating the application according to the time period, and the like.
The specific contents are as follows:
a hybrid cloud optimization method based on cloud manufacturer cost scheduling adopts a cost scheduler for scheduling a plurality of groups of cloud hosts, and the cost scheduler calculates the supportable request number of each cloud host under corresponding specifications by collecting dynamic information and static information of each cloud host; and calculating the equivalence relation between the cloud hosts under each model according to the supportable request number of each cloud host and the number of the cloud hosts required by the cloud hosts of each model to mutually reach the supportable request number of the opposite party.
Under the condition of giving the access amount, selecting a cloud host model which is higher than the access amount by one grade according to the supportable request number of the cloud hosts of each model, or calculating the access amount to be composed of the cloud hosts with the highest supportable request number and other models of cloud hosts, after selecting the corresponding cloud host model, converting the cloud hosts into single models of cloud hosts under specific number according to the equivalence relation, and finally forming a scheduling scheme with the lowest cost under different access amounts.
Preferably, the cloud hosts of different models are sorted according to the size of the supportable request number, the equivalence relation between adjacent cloud hosts is an integer, and the specific calculation rule of the equivalence relation is as follows: the method comprises the steps of calculating the supportable request number of other cloud hosts which is lower than the price of the self cloud host, wherein the supportable request number of the other cloud hosts is added to the supportable request number of the self cloud host, and the added price is lower than the price of the single self cloud host.
Further preferably, the specific calculation of the scheduling scheme with the lowest cost is divided into two cases, specifically as follows:
when the access amount is less, namely the access amount is lower than the maximum supportable request number in the set cloud hosts, selecting the cloud hosts which are one grade higher than the access amount, replacing the cloud hosts with the cloud hosts of other models according to the equivalence relation, and selecting the cloud hosts with low price under the same supportable request number to form a scheduling scheme with less access amount;
when the access amount is large, namely the access amount is higher than the maximum supportable request number in the set cloud hosts, calculating the number of an integer number of cloud hosts requiring the maximum supportable request number according to a calculation rule of the access amount/the maximum supportable request number, calculating the remainder left after calculation according to a scheduling scheme with small access amount, replacing the cloud hosts with other types according to an equivalence relation, and selecting the cloud hosts with low price under the same supportable request number to form the scheduling scheme with large access amount.
Preferably, the static information includes a price of a cloud host of each cloud manufacturer, a bandwidth price of each cloud manufacturer, and a storage price of each cloud manufacturer, and the static information is input by a user or acquired by calling an interface of the cloud manufacturer; the dynamic information comprises the CPU utilization rate, the memory utilization rate, the disk iops of the network request, the actual bandwidth and the disk bandwidth when the collection service is applied to the cloud host of each cloud manufacturer.
In summary, compared with the prior art, the beneficial effects of the invention are as follows:
on the basis of the original common scheduler on each type of cloud host, a cost scheduler is additionally arranged, the equivalence relation among the types is converted according to the supportable request number calculated by each type of cloud host, and the specific given access amount is analyzed and calculated by utilizing the price, the supportable request number and the equivalence relation information of each type of cloud host to form a scheduling scheme with the lowest relative cost;
aiming at two different levels of access volumes, dividing the access volumes into two conditions of less access volumes and more access volumes according to the access volumes, and forming a scheduling scheme with less access volumes and a scheduling scheme with more access volumes; and the analysis can be carried out according to historical access data, a time period scheme can be automatically generated, the machine with the best service performance can be used when the user is busy, and the machine with the low price can be selected at ordinary times.
Drawings
FIG. 1 is an architectural diagram of a background art container mixing cloud;
FIG. 2 is an architecture diagram of a container mixing cloud in an embodiment;
FIG. 3 is a schematic diagram of a cost scheduler in an embodiment;
FIG. 4 is a flowchart of the calculation of the lowest cost solution in the embodiment.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings.
A hybrid cloud optimization method based on cloud manufacturer cost scheduling is disclosed, and as shown in figure 2, a cost scheduler for scheduling cloud hosts of different models based on cost consideration is newly added on the basis of an original scheduling mode (the content of a specific scheduling mode refers to a background technology part), and the cost scheduler calculates the supportable request number under the corresponding specification of each cloud host by collecting dynamic information and static information of the cloud host of each cloud manufacturer; and calculating the equivalence relation between the cloud hosts under various types according to the supportable request number of each cloud host and the calculation rule that the price of the cloud host is less than that of the cloud host by adding the supportable request numbers of several cloud hosts which are less than the price of the cloud host.
Referring to fig. 4, in the present scheme, different scheduling schemes are given under different access amounts, in the case of a given access amount, a scheduling scheme with the lowest cost is calculated according to the supportable request number of each model of cloud host and the equivalence relation calculated between the supportable request number and the supportable request number, and the access amount is divided into two cases of a smaller access amount and a larger access amount according to the access amount, so that a scheduling scheme with a smaller access amount and a scheduling scheme with a larger access amount are formed.
The condition that the access amount is less means that the access amount is lower than the maximum supportable request number in the set cloud hosts, the cloud hosts which are one grade higher than the access amount are selected and replaced by the cloud hosts of other models according to the equivalence relation, and the cloud hosts with low price are selected under the same supportable request number, so that a scheduling scheme with less access amount is formed;
the condition that the access amount is large means that the access amount is higher than the maximum supportable request number in the set cloud hosts, the number of the integral number of the cloud hosts with the required maximum supportable request number is calculated according to the access amount/maximum supportable request number calculation rule, the remainder left after calculation is calculated according to the scheduling scheme with the small access amount, the cloud hosts with other models are replaced according to the equivalence relation, and the cloud hosts with low price are selected under the same supportable request number, so that the scheduling scheme with the large access amount is formed.
And according to historical access data, a time period scheme can be automatically generated, the machine with the best performance can be used when the user is busy, and the machine with the low price can be selected at ordinary times.
Referring to fig. 3, the static information includes a price of a cloud host of each cloud manufacturer, a bandwidth price of each cloud manufacturer, and a storage price of each cloud manufacturer, and the static information is input by a user or acquired by calling an interface of the cloud manufacturer; the dynamic information comprises the CPU utilization rate, the memory utilization rate, the disk iops of the network request, the actual bandwidth and the disk bandwidth when the collection service is applied to the cloud host of each cloud manufacturer.
The container mixing cloud scheduling method comprises the following steps:
step 1, generating a data table in a database, wherein list columns of the data table comprise cloud host names, prices, supportable request numbers and equivalence relations; calling an interface provided by the cloud host to the outside or manually inputting price data of the cloud host, and recording the price data into a data table in a price sequence; as shown in table 1 below:
TABLE 1
Step 2, deploying the cost scheduler to a kubernets container environment applying a plurality of cloud manufacturer servers, and balancing and averaging the load to each cloud host;
step 3, collecting the CPU utilization rate, the memory occupancy rate, the bandwidth, the network IOPS data and the network request number of each cloud host at intervals;
step 4, calculating the supportable request number of each cloud host under the corresponding specification, recording the supportable request number into a data table, and sorting according to the supportable request number and the price, wherein the sorting priority of the supportable request number is greater than that of the price; as set forth in table 2 below:
TABLE 2
Step 5, according to the record of the data table, sequentially calculating from the maximum supportable request number to the minimum supportable request number, wherein the supportable request numbers of other cloud hosts are required to be added to be larger than the supportable request number of the cloud host and the price sum is smaller than the cloud host in other cloud hosts with lower price than the cloud host, so as to calculate the equivalent relationship among the cloud hosts under various models; as shown in table 3 below:
TABLE 3
Step 6, under the condition of giving the access amount, calculating the scheduling scheme with the lowest cost according to the price, the supportable request number and the equivalent relation in the data table, wherein a specific flow chart is shown by referring to fig. 4, and the calculating steps are as follows:
step 6.1, selecting a cloud host which can support a first grade of request larger than the access amount, and if the access amount is 90, selecting 'A type'; visit volume 900, select "type E";
step 6.2, if the access amount is larger than the cloud host model of the maximum supportable request number in the table, calculating the required number of the cloud hosts of the maximum supportable request number by using the access amount/the maximum supportable request number, and selecting the cloud hosts of other models according to the remainder in the step 6.1; such as: the visit volume is 2000, and F type is selected; 2000/1500, equal to 1, and 500; 500 according to step 6.1, select "model D";
6.3, replacing the cloud host selected in the step 6.1 or the step 6.2 with other models according to the equivalence relation in the data table; such as the access volume 2000, requires: form 1 × F + form 1 × D; equivalent transformation into 3 × D + 1C; further found that: form 3 + form 1; finally, the selection that 4C types are needed to be the optimal price is obtained;
and 7, analyzing according to historical access data, automatically generating a time period scheme, using a machine with the best performance when the user is busy, and selecting a machine with low price at ordinary times.
The above description is intended to be illustrative of the present invention and not to limit the scope of the invention, which is defined by the claims appended hereto.