Ocelot 23.3.3

dotnet add package Ocelot --version 23.3.3
NuGet\Install-Package Ocelot -Version 23.3.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ocelot" Version="23.3.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ocelot --version 23.3.3
#r "nuget: Ocelot, 23.3.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ocelot as a Cake Addin
#addin nuget:?package=Ocelot&version=23.3.3

// Install Ocelot as a Cake Tool
#tool nuget:?package=Ocelot&version=23.3.3

Ocelot Logo

CircleCI

About

Ocelot is a .NET API Gateway. This project is aimed at people using .NET running a microservices / service-oriented architecture that need a unified point of entry into their system. However it will work with anything that speaks HTTP(S) and run on any platform that ASP.NET Core supports.

In particular we want easy integration with IdentityServer reference and Bearer tokens. We have been unable to find this in our 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.

Install

Ocelot is designed to work with ASP.NET Core and it targets net6.0, net7.0 and net8.0 frameworks. [^4]

Install Ocelot package and its dependencies using NuGet Package Manager:

Install-Package Ocelot

Or via the .NET CLI:

dotnet add package Ocelot

All versions can be found on nuget.

Documentation

  • Ocelot documentation — Read the Docs <br/>This includes lots of information and will be helpful if you want to understand the features Ocelot currently offers.
  • Ocelot RST Docs <br/>This includes source code of documentation as .rst files which are up to date for current development.

Coming up

You can see what we are working on in backlog.

Contributing

We love to receive contributions from the community, so please keep them coming 😮ctocat: <br/>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 in case 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 😮ctocat:

Finally, we mark all existing issues as label: help wanted label: small effort label: medium effort label: large effort. [^5] <br/>If you want to contribute for the first time, we suggest looking at a label: help wanted label: small effort label: good first issue 😮ctocat:

Notes

[^1]: Ocelot doesn’t directly support GraphQL. Developers can easily integrate the GraphQL for .NET library. [^2]: Ocelot does support Consul, Netflix Eureka, Service Fabric service discovery providers, and special modes like Dynamic Routing and Custom Providers. [^3]: Retry policies only via Polly library. [^4]: Starting with v21.0, the solution's code base supports Multitargeting as SDK-style projects. It should be easier for teams to move between (migrate to) .NET 6, 7 and 8 frameworks. Also, new features will be available for all .NET SDKs which we support via multitargeting. Find out more here: Target frameworks in SDK-style projects [^5]: See all labels of the repository.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (119)

Showing the top 5 NuGet packages that depend on Ocelot:

Package Downloads
MMLib.SwaggerForOcelot

Swagger generator for Ocelot downstream services.

Ocelot.Provider.Polly

Provides Ocelot extensions to use Polly.NET

Ocelot.Provider.Consul

Provides Ocelot extensions to use Consul

Ocelot.Cache.CacheManager

Provides Ocelot extensions to use CacheManager.Net

2AxisTechnology.Core.CL

Plz don't install.

GitHub repositories (31)

Showing the top 5 popular GitHub repositories that depend on Ocelot:

Repository Stars
anjoy8/Blog.Core
💖 ASP.NET Core 8.0 全家桶教程,前后端分离后端接口,vue教程姊妹篇,官方文档:
aspnetrun/run-aspnetcore-microservices
Microservices on .Net platforms which used ASP.NET Web API, Docker, RabbitMQ, MassTransit, Grpc, Yarp API Gateway, PostgreSQL, Redis, SQLite, SqlServer, Marten, Entity Framework Core, CQRS, MediatR, DDD, Vertical and Clean Architecture implementation with using latest features of .NET 8 and C# 12
phongnguyend/Practical.CleanArchitecture
Full-stack .Net 8 Clean Architecture (Microservices, Modular Monolith, Monolith), Blazor, Angular 17, React 18, Vue 3, BFF with YARP, Domain-Driven Design, CQRS, SOLID, Asp.Net Core Identity Custom Storage, OpenID Connect, Entity Framework Core, Selenium, SignalR, Hosted Services, Health Checks, Rate Limiting, Cloud Services (Azure, AWS, Google)...
geffzhang/NanoFabric
基于Consul + .NET Core + Polly + Ocelot + Exceptionless + IdentityServer等开源项目的微服务开发框架
abpframework/abp-samples
Sample solutions built with the ABP Framework
Version Downloads Last updated
23.3.3 2,606 6/11/2024
23.3.0 1,947 6/8/2024
23.2.2 61,264 4/5/2024
23.2.0 5,969 4/1/2024
23.1.0 72,364 3/4/2024
23.0.0 44,206 2/13/2024
22.0.1 141,009 12/8/2023
22.0.0 27,555 11/28/2023
21.0.0 17,668 11/21/2023
20.0.0 73,374 10/7/2023
19.0.4 7,496 10/6/2023
19.0.3 20,601 9/21/2023
19.0.2 193,454 4/22/2023
19.0.1 3,689 4/22/2023
19.0.0 3,325 4/22/2023
18.0.0 2,004,906 1/20/2022
17.0.1 205,265 12/20/2021
17.0.0 1,156,710 12/11/2020
16.0.2 16,714 12/11/2020
16.0.1 1,217,159 5/25/2020
16.0.0 47,728 5/23/2020
1.1.0 3,231 2/2/2017