| In recent years,with the construction of 5G network and the popularization of intelligent terminal equipment,the application of the Internet of Things has been booming.The traditional cloud computing mode needs to transmit the request from the terminal device to the remote cloud server,and then return the result after the task is processed.The high time delay caused by the long-distance data transmission makes the cloud computing mode unable to meet the requirements of the applications in the emerging scenarios such as automatic driving,intelligent industry,medical Internet of Things in response delay.The edge computing technology extends the cloud service capability to the network edge close to users,which can avoid long-distance transmission of request data and computing results between local devices and remote servers,thus making up for the shortcomings of the existing cloud computing model in response delay,and meeting the joint requirements of emerging Internet of Things applications for service performance and resources.At the same time,with the development of virtualization technology and container orchestration technology,the organizational form of applications in cloud computing scenarios has gradually shifted from the traditional Monolithic architecture to the microservice architecture,and this trend has also been extended to edge computing scenarios.However,with the migration of IoT applications from cloud center to edge cluster,how to optimize the operation and management of container applications combining the characteristics of edge computing scenarios and microservice architecture has become an urgent problem.In order to solve the above problems,this thesis focuses on the perception of microservice status and the control of micro-service under known status,from three perspectives of resource allocation,request scheduling and cluster management.The main contributions of this thesis include the following three aspects:First,for the problem of resource allocation in edge computing scenarios,this thesis proposes an elastic scaling algorithm based on microservice state awareness.The algorithm uses microservice instances as the main body of scaling,and flexibly adjusts the number of computing resources allocated to microservices and the overall distribution of these resources on the edge computing cluster on the premise of sensing the status of microservices.First,the characteristics of edge computing scenarios and the problems faced by resource allocation are analyzed,combined with the organizational form of applications under the microservice architecture,an elastic scaling model of microservice instances based on the number of requests is constructed.Then,based on the LSTM algorithm,the number of requests generated by microservices in the cluster in the future period is predicted,and on this basis,the number of microservice instances is adjusted in advance to cope with sudden changes in the number of requests.In addition,the concept of network space is introduced,and the nodes are mapped to three-dimensional space according to the network conditions between nodes,and the network overhead between nodes is reflected by the Euclidean distance of nodes.Finally,according to the different request speeds of each node,adjust the distribution of microservice instances in the cluster,so that the request can obtain the required computing resources nearby.The simulation results show that the microservice state-aware elastic scaling strategy proposed in this thesis reduces the number of overtime tasks by 80.98%compared with Kubernetes’ native responsive elastic scaling strategy,and at the same time reduces the average task completion delay by 16.67%.Second,for the problem of request scheduling in edge computing scenarios,this thesis designs a request scheduling algorithm based on microservice state awareness,which can reasonably match the microservice instances of concurrent tasks and concurrent tasks generated at a single time when the resource distribution is known.This thesis first analyzes the problems of Kubernetes’ native request scheduling strategy when it is applied to the edge computing scenario.Combining the task execution process under the microservice architecture,this thesis models the request scheduling problem in the edge computing scenario,and sets the optimization goal of reducing the average completion delay of tasks.To solve this problem,this thesis designs a request scheduling algorithm based on microservice state awareness,which combines the microservice state information such as the network status of the node where the microservice instance is located,the task processing ability of the microservice instance,and the distribution of the microservice instance in the cluster,and get the matching relationship between the request and the instance based on genetic algorithm,effectively improving the task execution efficiency.At the same time,this thesis combines this algorithm with the elastic scaling algorithm based on microservice state awareness,which further improves its optimization effect.The simulation results show that the algorithm designed in this thesis reduces the average completion delay of tasks by 45.25%compared with the original request scheduling algorithm of Kubernetes,and further expands this value to 49.63%when combined with the elastic scaling algorithm based on microservice state awareness.Third,for the problem of cluster management in edge computing scenarios,this thesis focuses on the perception of microservice status in edge computing clusters and the management and control of various resource objects,and gives the overall implementation of edge computing management and control system.First,according to the requirements of platform users for system state awareness,automatic resource allocation,visual cluster management and other functions,this thesis presents the architecture design of edge computing management and control system in software and hardware.Subsequently,this thesis provides specific explanations on the implementation methods of the cluster network information perception,cluster resource information perception,microservice instance elastic scaling,and cluster visualization control modules involved in implementing the above functions.Among them,for the automatic allocation of cluster resources,this thesis combines the microservice status information collected in real time by the cluster network information perception module and the cluster resource information perception module,and the elastic scaling algorithm based on microservice status perception proposed in the second chapter.The microservice instance elastic scaling module has been implemented in detail. |