网关(gateway)又称网间连接器、协议转换器。网关在网络层以上实现网络互连,是最复杂的网络互连设备,仅用于两个高层协议不同的网络互连。网关既可以用于广域网互连,也可以用于局域网互连。 网关是一种充当转换重任的计算机系统或设备。使用在不同的通信协议、数据格式或语言,甚至体系结构完全不同的两种系统之间,网关是一个翻译器。与网桥只是简单地传达信息不同,网关对收到的信息要重新打包,以适应目的系统的需求。同层--应用层。
示意图
相关搜索
从图中我们不难看出,推举度最高的里面有一个比较完善的,它叫ocelot。
ocelot is a .net api gateway. this project is aimed at people using .net running a micro services / service orientated architecture that need a unified point of entry into their system.
ocelot is a bunch of middlewares in a specific order.
ocelot manipulates the httprequest object into a state specified by its configuration until it reaches a request builder middleware where it creates a httprequestmessage object which is used to make a request to a downstream service. the middleware that makes the request is the last thing in the ocelot pipeline. it does not call the next middleware. the response from the downstream service is stored in a per request scoped repository and retrieved as the requests goes back up the ocelot pipeline. there is a piece of middleware that maps the httpresponsemessage onto the httpresponse object and that is returned to the client. that is basically it with a bunch of other features.
项目地址:https://github/tompallister/ocelot
项目文档:http://ocelot.readthedocs.io/en/latest
再次提醒各位同学,点关注不迷路哦!