Font Size: a A A

The Design And Implementation Of Gateway Core Module In API Gateway System Of Meituan Dianping

Posted on:2021-05-05Degree:MasterType:Thesis
Country:ChinaCandidate:Y LiFull Text:PDF
GTID:2428330647950845Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the rise of the microservice architecture and the development of the microservice frameworks,most of the businesses in many companies have already been serviced,and these businesses have access to frameworks that support unified protocols.In order to ensure the security of the system,these internal services often do not directly provide services to external.When there is no general API gateway system,the usual solution is to build a gateway between the Apps,browser,and internal services for each application.It forwards external requests to the internal service,and provides authentication,current-limiting and other functions.In the case of numerous businesses,there are multiple gateways within the company that play the same role.The maintenance and development of these gateways have caused problems such as inefficient work and redundant content.Therefore,this thesis designs a general API gateway system to support unified configuration management of all APIs to replace multiple business gateways.The general API gateway considers various business scenarios,supports users to access and configure the public components provided by the system on demand,such as security authentication,flow control,etc.;the system supports users to use the visual platform to configure API information,and provides the fully hosted API gateway service;Besides,the system forwards external HTTP requests to the back-end RPC service through protocol transformation,and widens the service application scenarios.The system is composed of gateway core module and API management module.This thesis focuses on the gateway core module.The core module of API gateway provides non-business functions such as authentication,current restriction,fuse and so on,to reduce the difficulty of other users' development;the module designs a flexible extension mechanism,provides users with the ability to access components on demand,and supports users to access custom components to complete specific business needs;it centrally manages API resources,therefore businesses do not need to apply for domain names,machines and other resources separately,that improves resources Utilization.The gateway core module adopts the framework structure of Jetty9 and Servlet3,aiming at lightweight and modularized development;it uses asynchronous method to process requests,designs fast-slow thread pools and independent thread pools to isolate the impact between API requests to provide high-performance gateway services;the gateway core module project are deployed by clusters to avoid the interaction between different businesses,it improve the stability of back-end services.This thesis describes the design and implementation of a gateway core module in the API gateway system that exposes interfaces through configuration.After many iterations,version 2.0 of the system has been developed and put into use in practice.It plays the role of reducing the development workload of the new business gateway,and also provides a better gateway solution for the old business.
Keywords/Search Tags:General API Gateway, Jetty, Servlet, NIO, Filter
PDF Full Text Request
Related items