Font Size: a A A

Design And Implementation Of Instant Messaging System Based On Cloud Native Architecture

Posted on:2022-01-13Degree:MasterType:Thesis
Country:ChinaCandidate:J Y GongFull Text:PDF
GTID:2518306602466864Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
With the development of Internet technology and application innovation,people's interactive communication methods have undergone great changes.In recent years,applications such as live broadcast platforms and video barrage websites have developed rapidly,and new forms of instant messaging interaction such as live streaming and video barrage have become more and more popular among netizens,especially young netizens.Faced with the severe test of this kind of messaging scenario with many participants and extremely interactive intensity,designing a high-performance,highly reliable,and flexible instant messaging system has become the key to ensuring the interactive experience.With the development of cloud computing technology,cloud native has become the hottest topic in the field of Internet technology.The container technology represented by Docker has changed the way of application packaging and distribution.Kubernetes,as the most important platform-level infrastructure in the containerization era,plays an important role in the field of container orchestration.Service Mesh represented by istio decouples service governance logic from business logic and solves the governance problem of microservice systems.These technologies can help developers build loosely coupled systems that are fault-tolerant,easy to manage,and easy to observe.This thesis first analyzes the development status of instant messaging and cloud native,and studies related theories and technical principles.Through the analysis of requirements and the extraction of message modules in the existing projects,using cloud native technology,a high-performance,loosely coupled,and scalable instant messaging system for real-time interactive scenarios has been constructed.Specific work content and technical solutions include:(1)Design and implementation of basic message sending and receiving functions.Use TCP and Web Socket long connections to establish a message channel with the client to provide real-time and reliable message delivery services for the business side,solving the problem of excessive pressure on the back-end server by the traditional polling-based message service.Aiming at the long connection keep-alive problem,this thesis adopts an adaptive intelligent heartbeat algorithm to dynamically detect the expiration time of the operator's NAT,and efficiently maintain the long connection with the client.In order to efficiently filter the illegal information in the message,the system implements a sensitive word filter based on the multipattern string matching algorithm Aho-Corasick.(2)Construction and governance of distributed microservices under the cloud native architecture.In terms of architecture design,the system is split into multiple microservices,and the services communicate through the g RPC protocol.Each service runs on the Kubernetes platform in the form of containerized application.With the help of Kubernetes' powerful orchestration control capabilities,the system realizes the rolling update of services and the automatic recovery of abnormalities.Using Service Mesh technology,the system realizes non-intrusive service governance capabilities.By collecting run-time indicators,logs,and tracking the call link,the system has achieved good service observability.(3)Design and implementation of predictive elastic scaling mechanism.The flow and load of the instant messaging system will constantly change,and the system's elastic scalability can improve the utilization of resources while ensuring the quality of service.The Kubernetes HPA mechanism is based on a responsive scaling model with lagging feedback to load changes.This thesis adopts a predictive scaling mechanism based on the EMDARIMA model.Through the prediction of system load changes,the number of Pod copies is adjusted in advance to alleviate the lagging problem of the responsive model.(4)Git Ops continuous integration and automated deployment based on Flux.Cloud native applications are deployed on infrastructure such as Kubernetes through declarative configuration and container images.The system implements a Git-centric continuous integration process based on private image warehouses and Flux.It can automatically detect changes in configuration warehouses and use the Kubernetes API to update the application on the cluster.Finally,the test system was deployed in the Alibaba Cloud Kubernetes environment.In this test environment,the system was tested for function and performance,and the predictive scaling model was compared and analyzed.The results show that the test system is effective and efficient,and the EMD-ARIMA combined forecasting model can effectively alleviate the lagging problem of the HPA mechanism.
Keywords/Search Tags:Instant Messaging, Cloud Native, Kubernetes, Service Mesh
PDF Full Text Request
Related items