Skip to content

Built on Netty and Dubbo, this high-performance microservice API gateway supports HTTP forwarding and RPC calls, with integrated authentication, rate limiting, and circuit breaking. Its complete ecosystem—including a registration center, management console, and SDK—provides a unified entry and governance for microservice architectures.

License

Notifications You must be signed in to change notification settings

kkkkendei/api-gateway

Repository files navigation

api-gateway

需求分析

从微服务架构的一个演进说起,最开始就是一个小型的电商系统,没有多少用户使用 ,这个时候可能就开发一个单体应用,用Spring MVC包装一些service,对外提供HTTP接口

image-20241224093452860

随着小电商的用户增多,变成一个中型电商系统,一个单体应用架构就不太能支撑所需的用户规模,就引入了分布式的部署形式,把一个个单体应用部署成分布式的结构,通过==Nginx==进行负载,对外提供服务

image-20241224093811482

随着系统越来越大,用户承载规模也越来越大,这个时候,就要用到微服务架构了。 把各个的模块拆分成独立的微服务系统,比如一套电商系统,可以拆分出用户服务,商品服务,支付服务,活动服务,交易服务,结算服务,物流服务。

image-20241224102101783

这些微服务之间组织成了一张大网,是允许对外提供服务的,但是微服务之间不太适合用HTTP进行通信,因为微服务很多,在用HTTP通信会很慢,所以有一种新的通信方式,也就是RPC架构Dubbo,但是对外提供给web、小程序之类的,web不认RPC,只认HTTP协议,而使用SpringMVC去调用RPC,会很复杂:

image-20241224102332987

这个时候就引入了API网关,它既可以满足RPC服务的注册,同时又能提供相关的HTTP请求协议的转发,以及对RPC接口的泛化调用。API网关也可以管理通用共性的功能,比如鉴权、风控、熔断、切量、限流、人群,被凝练成组件,以插件的形式放在API网关中进行使用,也就是说API网关统一管理了这些东西

About

Built on Netty and Dubbo, this high-performance microservice API gateway supports HTTP forwarding and RPC calls, with integrated authentication, rate limiting, and circuit breaking. Its complete ecosystem—including a registration center, management console, and SDK—provides a unified entry and governance for microservice architectures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published