| With the advent of the era of big data and the surge of traffic,the current system is in urgent need of expansion to cope with the surge of traffic,while vertical expansion is limited by hardware technology.Therefore,the current mainstream system adopts micro service architecture for horizontal expansion.Micro-service architecture abstracts the original system into micro-services of smaller granularity,forming an interconnected micro-service cluster to provide services externally,and increasing the processing capacity by adding common PCs.However,most of the existing micro-service frameworks used to build micro-services are oriented to one programming language.If the whole system is built with the technical system of only one language,the features of different languages cannot be fully utilized.If micro-service applications want to be built in different programming languages,corresponding micro-service framework implementations need to be developed for each programming language.Therefore,this thesis designs and implements a micro-service framework to provide cross-language capability,including three parts: registry system cluster,configuration center system cluster and Agent.The main research work of this thesis includes the following:1)Compared with the current registry system based on raft protocol,in order to improve the read-write performance,a highly available distributed registry system is designed using the final consistency model,and an event monitoring mechanism and incremental pull function are added to further reduce the network traffic.RocksDB database is introduced to provide efficient persistence capability for the cluster by using the fast storage feature of RocksDB.2)Based on the idea of service mesh,an agent with the ability to build micro-services across languages is designed and implemented.Json and Protobuf are used to solve the problem of different languages using different data structures and different number of parameters.At the same time,the function of connecting with the traditional micro-service protocol is designed.Finally,the Netty framework is used to improve the communication efficiency.3)Realize service governance on the basis of Agent,including fusing,degradation,traffic limiting,load balancing and fault tolerance.Fuses,degradations,and traffic limiting ensure service security and system availability,and prevent system crashes caused by traffic surges.Load balancing and fault tolerance functions are used to achieve the horizontal expansion of the system.4)Raft protocol is adopted to design and implement a strong consistency distributed configuration central system,storage service governance and Agent property configuration,and provide a concise Web interface to achieve easy-to-use centralized configuration management. |