Font Size: a A A

Design And Implementation Of Distributed RPC Framework CO-RPC Based On Coroutine

Posted on:2018-05-18Degree:MasterType:Thesis
Country:ChinaCandidate:L P ZhangFull Text:PDF
GTID:2428330569475181Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
In recent years,service-oriented architecture and micro-service architecture has gradually become the mainstream of large-scale distributed system architecture,and remote procedure call(RPC)framework as the most basic components of the system architecture,in which plays a vital role.At present,well-known Internet companies at home and abroad have their RPC frameworks,which support the company's core services,and keep billions of visits per day.So the optimization of the RPC framework will be significantly improved for the company's overall system architecture performance.CO-RPC uses coroutine to optimize the network IO model of traditional RPC frameworks,coroutine is a user-level thread,switching overhead is much less than the traditional thread,using coroutine to optimize can effectively reduce the time of system blocking.CO-RPC uses the Google's open source serialization framework Protobuf as protocol serialization,and it extends the Protobuf's compiler protoc,by adding code automatic generation for client code and service skeleton.For the load balancing module,a dynamic adaptive routing algorithm is proposed.The algorithm dynamically adjusts the probability that the server is selected based on the request timeout,and the client is responsible for setting the dynamic weights without adding any burden to the server.And the algorithm adds protective action to dynamic weights to achieve overload protection.The experimental results show that the performance of the CO-RPC's coroutine model and the asynchronous model are close to each other in the environment with high concurrency,while the coroutine call mode is the same as the synchronous call mode.Therefore,the coroutine model takes into account the implementation efficiency of the asynchronous model and the development efficiency of the synchronization model.Simultaneously,the network simulation tool Netem simulates the delay and packet loss of the network and compares it with other load balancing algorithms to verify the validity of the dynamic adaptive routing algorithm.
Keywords/Search Tags:Remote procedure call, Coroutine model, Protocol serialization, Load balancing
PDF Full Text Request
Related items