| With the advent of the cloud-native era,Kubernetes and container technology have become the mainstream technologies in the field of cloud computing.Kubernetes is the first choice of container management platform because it realizes the functions of container service discovery and scheduling,load balancing,service self-healing,elastic capacity expansion,and storage volume.Although Kubernetes has rich container management functions,it does not consider the cost of container operation and the relationship between the overall pod,nor does it have a rescheduling mechanism to save costs.Therefore,this thesis proposes a cost-effective initialization scheduling algorithm and rescheduling algorithm based on Kubernetes to reduce the cost of communication-intensive Web applications and periodic changing Web applications deployed in Kubernetes.The specific work of this thesis is as follows:1.Based on the Kubernetes cluster composed of remote nodes,this thesis constructs a cost-effective model for the Web system deployed on the cluster.The model comprehensively considers the cost of CPU,memory,and network energy consumption consumed by the pods while running and the cost of network communication between remote nodes.By adding the concept of "variable step size",this thesis improves the Beetle Antennae Search Algorithm(BAS)and proposes IBAS algorithm.2.Design a cost-effective initialization scheduling algorithm to solve the problem that Kubernetes does not consider the cost and the relationship between pods in business when deploying pods.Firstly,the algorithm divides the intimacy relationship of the whole pod through the network communication flow between pods,and then carries out cost-effective boxing through the improved Beetle Antennae Search Algorithm(IBAS),to allocate the pods with frequent network communication to the same node to reduce the cost.Experimental results show that the algorithm can effectively reduce the cluster cost.3.Design a cost-effective Kubernetes rescheduling algorithm to solve the problem that Kubernetes has no rescheduling mechanism,so the position of a pod cannot be adjusted with the change of cluster business,which increases the cluster cost in some scenarios.Firstly,the algorithm analyzes the historical log records of the cluster business to obtain the periodic change relationship of pod intimacy concerning the business.The SARIMA time series analysis technology is used to predict the time point of the business cycle change of the next day through the historical log.At the predicted time point,according to the corresponding pod intimacy relationship,the rescheduling is completed through the replacement of new and old pods to reduce the cost.Experimental results show that the algorithm can effectively reduce the cluster cost.4.Build Kubernetes cluster and Prometheus monitoring system on the cloud platform.The algorithm is verified by experiments.The results show that the initialization scheduling algorithm proposed in this thesis can reduce the cost of a communication-intensive Web system by 20.97%,and the rescheduling algorithm can reduce the cost of periodic Web applications the in cluster by 5.6%. |