.NET API Gateway Ocelot 介绍
项目:https://github.com/ThreeMammals/Ocelot
Windows (AppVeyor)
Linux & OSX (Travis)
Windows
MacOS
Linux
Ocelot
Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a micro services / service oriented architecture that need a unified point of entry into their system. However it will work with anything that speaks HTTP and run on any platform that ASP.NET Core supports.
In particular I want easy integration with IdentityServer reference and bearer tokens.
We have been unable to find this in my current workplace without having to write our own Javascript middlewares to handle the IdentityServer reference tokens. We would rather use the IdentityServer code that already exists to do this.
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 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!
Features
A quick list of Ocelot's capabilities for more information see the documentation.
- Routing
- Request Aggregation
- Service Discovery with Consul & Eureka
- Service Fabric
- Kubernetes
- WebSockets
- Authentication
- Authorisation
- Rate Limiting
- Caching
- Retry policies / QoS
- Load Balancing
- Logging / Tracing / Correlation
- Headers / Query String / Claims Transformation
- Custom Middleware / Delegating Handlers
- Configuration / Administration REST API
- Platform / Cloud Agnostic
How to install
Ocelot is designed to work with ASP.NET Core only and it targets netstandard2.0
. This means it can be used anywhere .NET Standard 2.0
is supported, including .NET Core 2.1
and .NET Framework 4.7.2
and up. This documentation may prove helpful when working out if Ocelot would be suitable for you.
Install Ocelot and it's dependencies using NuGet.
Install-Package Ocelot
Or via the .NET Core CLI:
dotnet add package ocelot
All versions can be found here
Documentation
Please click here for the Ocelot documentation. This includes lots of information and will be helpful if you want to understand the features Ocelot currently offers.
Coming up
You can see what we are working on here.
Contributing
We love to receive contributions from the community so please keep them coming :)
Pull requests, issues and commentary welcome!
Please complete the relevant template for issues and PRs. Sometimes it's worth getting in touch with us to discuss changes before doing any work incase this is something we are already doing or it might not make sense. We can also give advice on the easiest way to do things :)
Finally we mark all existing issues as help wanted, small, medium and large effort. If you want to contribute for the first time I suggest looking at a help wanted & small effort issue :)
.NET API Gateway Ocelot 介绍的更多相关文章
- API gateway 之 kong 基本介绍 (一)
一.API网关概念介绍 API 网关,即API Gateway,是大型分布式系统中,为了保护内部服务而设计的一道屏障,可以提供高性能.高可用的 API托管服务,从而帮助服务的开发者便捷地对外提供服务, ...
- API网关Ocelot 使用Polly 处理部分失败问题
在实现API Gateway过程中,另外一个需要考虑的问题就是部分失败.这个问题发生在分布式系统中当一个服务调用另外一个服务超时或者不可用的情况.API Gateway不应该被阻断并处于无限期等待下游 ...
- 谈谈微服务中的 API 网关(API Gateway)
前言 又是很久没写博客了,最近一段时间换了新工作,比较忙,所以没有抽出来太多的时间写给关注我的粉丝写一些干货了,就有人问我怎么最近没有更新博客了,在这里给大家抱歉. 那么,在本篇文章中,我们就一起来探 ...
- 微服务中的 API 网关(API Gateway)
API 网关(API Gateway)提供高性能.高可用的 API 托管服务,帮助用户对外开放其部署在 ECS.容器服务等云产品上的应用,提供完整的 API 发布.管理.维护生命周期管理.用户只需进行 ...
- API Gateway微服务
微服务中的 API 网关(API Gateway) 前言 又是很久没写博客了,最近一段时间换了新工作,比较忙,所以没有抽出来太多的时间写给关注我的粉丝写一些干货了,就有人问我怎么最近没有更新博客了 ...
- 服务中的 API 网关(API Gateway)
我们知道在微服务架构风格中,一个大应用被拆分成为了多个小的服务系统提供出来,这些小的系统他们可以自成体系,也就是说这些小系统可以拥有自己的数据库,框架甚至语言等,这些小系统通常以提供 Rest Api ...
- [转载] 构建微服务:使用API Gateway
原文: http://mp.weixin.qq.com/s?__biz=MzA5OTAyNzQ2OA==&mid=206889381&idx=1&sn=478ccb35294c ...
- 微服务实战(二):使用API Gateway
微服务实战(一):微服务架构的优势与不足 微服务实战(二):使用API Gateway 微服务实战(三):深入微服务架构的进程间通信 微服务实战(四):服务发现的可行方案以及实践案例 微服务实践(五) ...
- 聊聊 API Gateway 和 Netflix Zuul
最近参与了公司 API Gateway 的搭建工作,技术选型是 Netflix Zuul,主要聊一聊其中的一些心得和体会. 本文主要是介绍使用 Zuul 且在不强制使用其他 Neflix OSS 组件 ...
随机推荐
- django 无限层级的评论
一.摘要 拓展 django 官方的评论库,为评论提供无限层级的支持. 二.demo演示 访问链接: https://github.com/zmrenwu/django-mptt-comments 下 ...
- 24H玩转 Grafana 被工程师称相当专业,如何做到?
国庆假期发生了两件小事,其一是我默默度过 35 周岁生日,其二是玩了下grafana `并在节后第一天被工程师 M 称赞:相当专业. 1.我为什么要玩 grafana 呢? 数月前我提交了一份数据后台 ...
- Net Core 自定义 Middleware 加密解密
前言:第一次写文章,有问题请轻喷 当前使用 Net Core 版本 2.1.3 我们经常在开发中需要把实体的主键 Id 传输到前端,但是在Get的时候又不想让前端能看到明文,我们通常会加密这些数据,所 ...
- 2019 钢银java面试笔试题 (含面试题解析)
本人3年开发经验.18年年底开始跑路找工作,在互联网寒冬下成功拿到阿里巴巴.今日头条. 钢银等公司offer,岗位是Java后端开发,最终选择去了 钢银. 面试了很多家公司,感觉大部分公司考察的点都差 ...
- 仿百度图片首页--HTML+CSS练手项目1【Table】
[本文为原创,转载请注明出处] 技术[CSS+HTML] 布局[Table] 图片准备[百度图标.10张不同类型图] --------------------------------------- ...
- java-ExceptionHandler全局异常处理
springmvc配置文件: <!-- 定义全局异常处理,只有一个全局异常处理器起作用 --> <bean id="exceptionResolver" clas ...
- oracle中的存储过程(实例一)
引子 这是测试环境存在了很久的问题.由于基础配置信息(如:代理人信息)不像生产环境有专人维护,常常会有数据过期,导致无法使用的情况. 而很多配置数据是在外围系统维护(如代理人信息,在销管系统)以往的解 ...
- HTML&CSS基础-内联样式和内部样式表
HTML&CSS基础-内联样式和内部样式表 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.CSS(Cascading Style Sheets)简介 层叠样式表(Cas ...
- cmdb资产管理2
新增资产 现在api服务端已经能获取到我们要做的操作了.接下来应该是补充获取操作后对应的程序编写 我们要做的是把post请求发过来的数据保存到数据库.我们创建repository 名字的app,并设计 ...
- 使用Arduino开发板连接干簧管(Reed Switch)的方法
在现实生活中,干簧管(Reed Switch)有许多重要的应用,如磁性门开关.笔记本电脑.智能手机等.在本篇文章中,我们将了解一些干簧管的知识,并介绍如何使用Arduino开发板连接干簧管. 干簧管( ...