Bot releases are hidden (Show)
Route path template placeholders and their validation rules
Special thanks to Guillaume Gnaegi and Fabrizio Mancin!
The bug is related to the Placeholders feature in Configuration and Routing.
The bug was introduced in version 23.2.0 as a part of PR #1927.
The new validation rules of the FileConfigurationFluentValidator
class do not allow the Ocelot app to start when implicit placeholders are defined in custom implementations, such as middlewares, delegating handlers, and replaced services in the dependency injection (DI) container.
These new rules are capable of validating explicit placeholders only within the UpstreamPathTemplate
and DownstreamPathTemplate
properties. Unfortunately, they cannot oversee implicit placeholders in custom implementations, and they do not validate early during the Ocelot app startup process.
Ensure that you avoid using version 23.2.0. If you are currently on that version, upgrade to version 23.2.2 by applying this hotfix patch.
With version 23.2.0, particularly if you have overridden certain service classes or implemented custom logic that manipulates placeholders, you may encounter Ocelot app crashes accompanied by the following errors in the log:
One or more errors occurred. (Unable to start Ocelot, errors are: XXX)
where XXX
are the following validation error messages:
UpstreamPathTemplate 'UUU' doesn't contain the same placeholders in DownstreamPathTemplate 'DDD'
DownstreamPathTemplate 'DDD' doesn't contain the same placeholders in UpstreamPathTemplate 'UUU'
Finally, the validation rules resulted from the incorrect assumption that placeholders are always explicit and can be validated early. Therefore, custom implementations and feature services in the dependency injection (DI) container, which rely on or manipulate placeholders, should validate the configuration JSON and appropriate options later, directly within their service implementations.
2ded8726 by Raman Maksimchuk on Friday, April 05 at 15:13 β
Release 23.2.1-2 artifacts | +semver: patch
14c6d82b by Raman Maksimchuk on Friday, April 05 at 12:57 β
#2031 Don't validate placeholders in templates (#2032)
d1855cb9 by Raman Maksimchuk on Thursday, April 04 at 00:17 β
#1673 #1672 Update Docker for CircleCI builds (#2030)
Published by TomPallister 7 months ago
Read the Docs: Ocelot 23.2
This is a technical release: no other information.
Full Changelog: https://github.com/ThreeMammals/Ocelot/compare/23.2.0...23.2.1
Published by TomPallister 7 months ago
Codenamed: Lunar Eclipse
Read the Docs: Ocelot 23.2
AddOcelot
method merges the ocelot.*.json files into a single ocelot.json file as the primary configuration file, which is written back to disk and then added to the IConfigurationBuilder
for the well-known IConfiguration
. You can now call another AddOcelot
method that adds the merged JSON directly from memory to the IConfigurationBuilder
, using AddJsonStream
instead.[Obsolete]
attribute and renamed using the V7
suffix. And the old v7 implementation has been moved to the v7 namespace.IServiceCollection
DI extensions to register Ocelot services resulted in the ServiceCollection
provider being forced to be created by calling BuildServiceProvider()
.1st π₯ goes to Eirik Bjornset for delivering 1 feature in 19 files changed
2nd π₯ goes to Aly Kafoury for delivering 1 feature in 9 files changed
3rd π₯ goes to Adrien Hupond for delivering 1 feature in 6 files changed
β Adrien Hupond, @ArwynFr
β Aly Kafoury, @AlyHKafoury
β Eirik Bjornset, @ebjornset
β Raman Maksimchuk, @raman-m
β Raynald MessiΓ©, @RaynaldM
Milestone: February'24
IServiceCollection
(#1986)AddOcelot
method to support merging of configuration files to memory (#1227)Published by TomPallister 8 months ago
Codenamed as Hornussen Sport
Read the Docs: Ocelot 23.1
HttpContext
is not copied when there is only one downstream route, and etc.HttpContext.User
information was not copied if there was more than one downstream request.chunked
was present even when there was no content or the request body size was 0. These cases are now addressed.AddPolly
extension methods.PayloadTooLargeError
(Ocelot error code 41
).1st π₯ goes to Guillaume Gnaegi for delivering 2 features
2nd π₯ goes to Alexander Reinert for delivering 1 feature in 8 files changed
3rd π₯ goes to Steven Liekens for delivering 1 feature in 5 files changed with 353 insertions
ββ Guillaume Gnaegi, @ggnaegi
β Alexander Reinert, @alexreinert
β Chris Williams, @williamscs
β Masoud Bahrami, @masoud-bahrami
β Raman Maksimchuk, @raman-m
β Raynald MessiΓ©, @RaynaldM
β Steven, @sliekens
β Ugway77, @Ugway77
Milestone: January'24
IOException
while reading incoming request body (#1769)HttpRequesterMiddleware
(#1953)User
in MultiplexingMiddleware
(#1462)DistributedCacheRateLimitCounterHandler
class (#1969)Published by TomPallister 8 months ago
Codenamed as Sunny Koliada
Read the Docs: Ocelot 23.0
Modification of the RequestMapper
with a brand new StreamHttpContent
class, in Ocelot.Request.Mapper
namespace. The request body is no longer copied when it is handled by the API gateway, avoiding Out-of-Memory issues in pods/containers. This significantly reduces the gateway's memory consumption, and allows you to transfer content larger than 2 GB in streaming scenarios.
Introduction of a new Message Invoker pool, in Ocelot.Requester
namespace. We have replaced the HttpClient class with HttpMessageInvoker, which is the base class for HttpClient
. The overall logic for managing the pool has been simplified, resulting in a reduction in the number of CPU cycles.
Full HTTP content buffering is deactivated, resulting in a 50% reduction in memory consumption and a performance improvement of around 10%. Content is no longer copied on the API gateway, avoiding Out-of-Memory issues.
Memory consumption summary. We would like to share here some screenshots of K8s pods from our production environment. These charts were created on January 29-30. Special thanks to @RaynaldM for providing the screenshots!
(Click on the image to see the full resolution picture) π
3 hours chart | 1 day chart | 2 days chart |
---|---|---|
~300 MB on average | ~320 MB on average | ~340 MB on average |
Finally, we confirm that memory consumption is stable, and Ocelot ver. 23.0 is ready for use in production environmentsβeven as a containerized application that may lack the memory resources of a Docker container. The typical memory consumption of a minimal ASP.NET Web API application at startup is around 250 MB. However, this figure depends on several indicators, including content body size, application load (i.e., requests per second index), and integration within the application core.
For high-load systems, a deployed Ocelot Docker container can allocate up to 400-500 MB, but we hope it wonβt exceed that range. In our production environment, a container instance typically occupies around 350 MB. We recommend monitoring the deployed containers in your production environment, paying attention to their CPU & memory consumption. We believe that there will be no out-of-memory incidents at all.
Ocelot.Cache.CacheManager: Introduced default cache key generator with improved performance (the DefaultCacheKeyGenerator
class). Old version of CacheKeyGenerator
had significant performance issue when reading full content of HTTP request for caching key calculation of MD5 hash value. This hash value was excluded from the caching key.
Ocelot.Provider.Kubernetes: Fixed long lasting breaking change being added in version 15.0.0, see commit https://github.com/ThreeMammals/Ocelot/commit/6e5471a714dddb0a3a40fbb97eac2810cee1c78d. The bug persisted for more than 3 years in versions 15.0.0-22.0.1, being masked multiple times via class renaming! Special Thanks to @ZisisTsatsas who once again brought this issue to our attention, and our team finally realized that we had a breaking change and the provider was broken.
Ocelot.Provider.Polly: A minor changes without feature delivery. We are preparing for a major update to the package in the next release.
AuthenticationMiddleware
: Added new Multiple Authentication Schemes feature by @MayorSheFFOutputCacheMiddleware
, RequestIdMiddleware
: Added new Cache by Header Value feature by @EngRajabi, and redesigned as Default CacheKeyGenerator feature by @raman-mDownstreamUrlCreatorMiddleware
: Fixed bug for ending/omitting slash in path templates aka Empty placeholders feature by @AlyHKafouryConfigurationMiddleware
, HttpRequesterMiddleware
, ResponderMiddleware
: System upgrade for Custom HttpMessageInvoker pooling feature by @ggnaegiDownstreamRequestInitialiserMiddleware
: System upgrade for Performance of Request Mapper feature by @ggnaegiOcelot.Benchmarks
testing project has been updated with new PayloadBenchmarks
and ResponseBenchmarks
by @ggnaegiOcelot.AcceptanceTests
testing project has been refactored by @raman-m using the new AuthenticationSteps
class, and more refactoring will be done in future releases1st π₯ goes to Guillaume Gnaegi for delivering 3 features
2nd π₯ goes to Igor Polishchuk for delivering 1 feature in 25 files changed
3rd π₯ goes to Aly Kafoury for delivering 1 feature in 9 files changed
βββ Guillaume Gnaegi, @ggnaegi
ββ Raman Maksimchuk, @raman-m
β Aly Kafoury, @AlyHKafoury
β Igor Polishchuk, @MayorSheFF
β Tanmay Seth, @ks1990cn
β Zisis Tsatsas, @ZisisTsatsas
β Mohsen Rajabi, @EngRajabi
Kube
service discovery provider (#1954)HttpMessageInvoker
pooling (#1824)We would like to share our team's plans for the future regarding: development trends, ideas, community expectations, etc.
Without a doubt, we care about code quality every day, following best development practices. And we review, test, refactor, and redesign features with overall performance in mind. In the next few releases (versions 23.x-24.0) we will take care of: generic providers, multiplexing middleware (Aggregation feature), memory management.
There is a lot of community interest in this HTTP-based protocol.
Consul is our leading technology for service discovery. We are constantly improving the use cases for the Ocelot.Provider.Consul
package and trying to improve the code inside the package.
Polly was released with the new v.8.2+ after .NET 8. So we have to update Ocelot.Provider.Polly
package taking into account new Polly behavior of redesigned features.
Brainstorming to redesign Rate Limiting, Websockets. More details in future release notes.
Planning of support for Swagger and gRPC proto. More details in future release notes.
Published by TomPallister 11 months ago
Default timeout vs the Quality of Service feature
Special thanks to Alvin Huang!
The bug is related to the Quality of Service feature (aka QoS) and the HttpClient.Timeout property.
QoSOptions
section is defined in the route config, then the bug is masked rather than active, and the timeout value is assigned from the QoS TimeoutValue property.QoSOptions
section is not defined in the route config or the TimeoutValue property is missing, then the bug is active and affects downstream requests that never time out.FileQoSOptions
class. Make sure your custom code proper usage of the Ocelot.Configuration.DownstreamRoute
class QosOptions.TimeoutValue property!In version 22.0, the bug was found in the explicit default constructor of the FileQoSOptions class with a maximum TimeoutValue. Previously, the default constructor was implicit with the default assignment of zero 0
to all int
properties.
The new explicit default constructor breaks the old implementation of QoS TimeoutValue logic, as our QoS documentation states:
Finally, the "default 90 second" logic for HttpClient
breaks down when there are no QoS options and all requests on those routes are infinite, if, for example, downstream services are down or stuck.
β Alvin Huang, @huanguolin
β Raman Maksimchuk, @raman-m
Published by TomPallister 11 months ago
Tag v22.0 β https://github.com/ThreeMammals/Ocelot/commit/6740f5059f8d375b568726498357709a4e1a3ed2
Codenamed as Swiss Locomotive
WriteLog
method for the OcelotLogger
string.Format
or interpolated stringsILogger.IsEnabled
before calling the native WriteLog
implementation and invoking string factory method8.2.0
with some code improvements{everything}
and query string duplicates removal1st π₯ goes to Guillaume Gnaegi for delivering 2 features in 99 files changed
2nd π₯ goes to Raynald MessiΓ© for delivering 2 features in 15 files changed
3rd π₯ goes to @jlukawska for delivering 1 feature in 51 files changed
βββ @raman-m
ββ Guillaume Gnaegi, @ggnaegi
ββ Raynald MessiΓ©, @RaynaldM
β Samuel Poirier, @sam9291
β Stjepan, @wast
β @jlukawska
Published by TomPallister 11 months ago
Read article: Announcing .NET 8 by Gaurav Seth, on November 14th, 2023
We are pleased to announce to you that we can now offer the support of .NET 8.
But that is not all, in this release, we are adopting support of several versions of the .NET framework through multitargeting.
The Ocelot distribution is now compatible with .NET 6, 7 and 8. π
In the future, we will try to ensure the support of the .NET SDKs that are still actively maintained by the .NET team and community. Current .NET versions in support are the following: 6, 7, 8.
As an ASP.NET Core app, now Ocelot targets net6.0
, net7.0
and net8.0
frameworks. Starting with v21.0.0, the solution's code base supports Multitargeting as SDK-style projects. Find out more here: Target frameworks in 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.
1st π₯ goes to Guillaume Gnaegi for delivering 1 feature in 63 files changed
2nd π₯ goes to Raman Maksimchuk for delivering 1 feature in 17 files changed
3rd π₯ goes to @raman-m for delivering 1 feature in 5 files changed
β Guillaume Gnaegi, @ggnaegi
β Raman Maksimchuk, @raman-m
Published by TomPallister 12 months ago
Special thanks to @ggnaegi! π
Published by TomPallister about 1 year ago
Codenamed as Polish Apple
1st π₯ goes to Raman Maksimchuk for delivering 5 features
2nd π₯ goes to jlukawska for delivering 3 features in 7 files changed
3rd π₯ goes to raman-m for delivering 3 features in 3 files changed
βββββ Raman Maksimchuk
βββ jlukawska
βββ raman-m
ββ Guillaume Gnaegi
β Anthony Steele
β Ben Bartholomew
β DanHarltey
β Fabrizio Mancin
β Freddy
β Kevin Grossmann
β Marco
β Roman
β Thiago Loureiro
β Vijay Karavadra
β guoyongchang
β leonluc-dev
β zhangq
65be4b65 by raman-m on Friday, October 06 at 20:52 β
Fix Git command placeholder bug
d2f76ae0 by raman-m on Friday, October 06 at 19:44 β
+semver: breaking | Polish Apple release | 2nd build
adac0a24 by raman-m on Friday, October 06 at 10:20 β
Polish Apple release
fcdd2744 by Raman Maksimchuk on Friday, October 06 at 09:07 β
A brand new Release Notes feature for Releases being made by 'build.cake' script (#1716)
e5f31ef0 by Raman Maksimchuk on Monday, October 02 at 19:17 β
Follow up #1670: Fix StyleCop issues and improve the code (#1711)
e950cf2f by Ben Bartholomew on Saturday, September 30 at 14:50 β
#653 Adding null check for downstreamResponse (#1334)
5a81cce1 by Freddy on Saturday, September 30 at 19:34 β
Second parameter of Substring is wrong in HeaderFindAndReplaceCreator (#1424)
5dbbbefc by Fabrizio Mancin on Saturday, September 30 at 16:26 β
#1400 Manage multiple patterns for allowed/blocked IPs via Security Options config section (#1399)
cc0b9b83 by Kevin Grossmann on Friday, September 29 at 20:42 β
Ignore port when using UpstreamHost option (#1505)
f8eb5e1c by Guillaume Gnaegi on Friday, September 29 at 19:44 β
#1634 #1487 #1329 #1304 #1294 #793 Consul polling of services: enhancements and fix errors (#1670)
ab294423 by Roman on Friday, September 29 at 11:27 β
#1509 #1683 Replace non-WS protocols for the 'ClientWebSocket' in WebSocketsProxyMiddleware (#1689)
190b0017 by leonluc-dev on Thursday, September 28 at 18:14 β
#1225 Update ServiceDiscovery documentation and samples to include Custom Providers (#1656)
fa179bf4 by zhangq on Thursday, September 28 at 23:04 β
#1375 #1237 #925 #920 Fix DownstreamRoute DangerousAcceptAnyServerCertificateValidator (#1377)
5fd5bf93 by Raman Maksimchuk on Monday, September 25 at 18:00 β
#1681 'using' statements life hacks (#1682)
8b892574 by Raman Maksimchuk on Monday, September 25 at 16:54 β
#1700 Add sequential tests with disabled parallelization (#1705)
fdad15d4 by Guillaume Gnaegi on Monday, September 25 at 14:15 β
#1700 Create custom Ocelot config file when instantiating steps during parallel execution (#1703)
75cd0b30 by Raman Maksimchuk on Monday, September 25 at 10:51 β
#1677 #1686 United documentation update (#1678)
b7976fcc by guoyongchang on Saturday, September 23 at 09:30 β
#1351 #1510 New AddOcelot extensions to support custom ASP.NET MVC pipeline building via the IMvcCoreBuilder interface (#1655)
4d245ec7 by Vijay Karavadra on Saturday, September 23 at 19:19 β
#1228 #1235 #1247 Overloaded AddOcelot method for dynamic FileConfiguration construction (#1569)
5ad807d7 by jlukawska on Saturday, September 23 at 11:12 β
#893 Problems to cancel a request (CancellationToken) (#1367)
b27761f4 by jlukawska on Saturday, September 23 at 10:43 β
#1057 #1068 Add service discovery logs (#1366)
ec85b132 by jlukawska on Friday, September 22 at 21:39 β
#1288 Query string char missing (#1335)
8893f049 by Marco on Friday, September 22 at 21:25 β
fix: minor grammar fix in default rate limit response message (#1639)
e6081cef by Thiago Loureiro on Friday, September 22 at 21:15 β
Fixed logger message typos in the OutputCacheMiddleware class (#1315)
21bc4a4a by DanHarltey on Friday, September 22 at 20:05 β
#908 Quality of Service - Configuration (#1279)
455d7d3f by Anthony Steele on Friday, September 22 at 19:45 β
Exception mapper naming (#1211)
Published by TomPallister about 1 year ago
ebe70fd7 - Raman Maksimchuk - Merge pull request #1695 from ThreeMammals/develop
a90664b4 - Raman Maksimchuk - Release features #1499 #1663 (#1660) (#1693)
346df03d - Tom Pallister - Update README.md
433dfcaf - Justin Middler - fixed up required spacing in README (#1499)
6ca54fe0 - Raman Maksimchuk - #1660 Huge logs because of StyleCop.Analyzers warnings (#1663)
bc25f4e8 - TomPallister - push code coverage for main and develop branches
Published by TomPallister over 1 year ago
fdc761c3 - TomPallister - updated docs
3bd0f8d5 - Tom Pallister - updated report generator (#1648)
Published by TomPallister over 1 year ago
b9cc313c - TomPallister - updated nuget package icon url
Published by TomPallister over 1 year ago
46b12a2f - TomPallister - updated cake syntax
4db816af - TomPallister - updated Cake.Coveralls
dec610d1 - TomPallister - updated csmacnz.Coveralls
66d09e3d - TomPallister - updated csmacnz.Coveralls
b2ec1650 - TomPallister - updated eddiewebb/[email protected]
312f1c6b - Tom Pallister - tests passing on debian 10 (#1647)
07263be5 - TomPallister - Merge branch 'RaynaldM-upgrade-to-net7' into develop
89208364 - TomPallister - +semver: major updated build
c444c254 - Ray - last packages update
4afdea35 - Ray - code cleaning
96a3fd82 - Ray - First step
Published by TomPallister over 2 years ago
36ad6e1e - TGP - use the DotNetNuGet cake code
b6b789c3 - TGP - add nuget to cake as a tool
565968a8 - TGP - use xplat nuget package for cake
822a0b0d - TGP - add nuget tool for publish to cake script
f1db0257 - TGP - install net5.0 in correct place in container
c07e6ee4 - TGP - use new base image for build & release
69bd9a85 - TGP - fix test and use latest coveralls tool
52555fc7 - Tom Pallister - switch to main for default branch (#1559)
e5ee57bf - Tom Pallister - Feat/net6.0 upgrade (#1558)
Published by TomPallister almost 3 years ago
3dcc6b6d - TGP - Merge branch 'feat/fix-build' into develop
ba4b7672 - TGP - use new deletedir api
47a024b8 - TGP - fix cake.json version
096f94d9 - TGP - update nuget packages to reference ocelot logo from GitHub
ff6f6e38 - TGP - update nuget packages to reference ocelot logo from GitHub
77c6c30e - TGP - add ocelot logo to repo
3ef6abd7 - TomPallister - +semver: breaking bump to version 17.0.0
b46fedac - TomPallister - rename authorisation to authorization
b2dd70f5 - TomPallister - release process note
ede71c48 - TomPallister - updated release process
ab3533bb - TomPallister - bring back develop
f62ed72d - TomPallister - all packages upgraded and tests passing
17b0555f - TomPallister - tests passing
32551624 - TomPallister - wip tests failing
6eed692c - TomPallister - more package updates
ebf85326 - TomPallister - removed rafty and updated more packages
b356539c - TomPallister - update nuget packages and graphql example
fdad2bb3 - TomPallister - update circle build image
9bc5ad1c - TomPallister - dont need this
a39b5fd5 - TomPallister - dont need .config
bdefa2de - TomPallister - dont need .config
03c8cd6a - TomPallister - works on linux
de0f4f97 - TomPallister - build finally working....MAGIC
94ce0224 - TomPallister - wip
3a8d55f7 - TomPallister - Merge branch 'feat/net5upgrade' of github.com:ThreeMammals/Ocelot into feat/net5upgrade
6e1dc3fd - TomPallister - wip
f4131028 - TomPallister - wip
7e2b312f - TomPallister - Merge branch 'feat/net5upgrade' of github.com:ThreeMammals/Ocelot into feat/net5upgrade
730c940c - TomPallister - wip
ef69429d - TomPallister - mono complete
71a1053d - TomPallister - build works on windows
a5a1606c - TomPallister - upgrade dotnet test and coverages packages
1185576b - TomPallister - wip
0fab351c - TomPallister - move to dotnet tools for cake
4b23e0ce - TomPallister - line endings
f16cdd86 - TomPallister - fix tests and line endings
c1776fb5 - TomPallister - fix warnings
7f49bf5f - TomPallister - wip
a9eec31a - TomPallister - fix code broken after net5.0 upgrade
1c6bfc33 - TomPallister - add make and build tools to image
7254d4d1 - TomPallister - +semver: breaking upgrade base build image to net5.0
708b5758 - TomPallister - upgrade csproj to net5.0
Published by TomPallister almost 4 years ago
9abd47b0 - Tom Pallister - +semver: breaking bump to version 17.0.0 (#1392)
Published by TomPallister almost 4 years ago
b74a1197 - Tom Pallister - +semver: upgrade to net5.0 (#1390)
Published by TomPallister over 4 years ago
c3a0cf11 - TomPallister - Merge branch 'kjellegafvelin-master'
2b8c8727 - TomPallister - Revert "Feat/opentracing (#1243)"
865520f2 - Tom Pallister - Feat/opentracing (#1243)
21b9d73c - TomPallister - tweaks
56fe7b5b - TomPallister - wip
Published by TomPallister over 4 years ago
3439be89 - Tom Pallister - Rename all ReRoute to Route to move closer to YARP +semver: breaking