Releases: ThreeMammals/Ocelot
23.2.1
Documentation patch (version 23.2.1) for 23.2.0 release
Read the Docs: Ocelot 23.2
This is a technical release: no other information.
What's Changed
Full Changelog: 23.2.0...23.2.1
23.2.0
February 2024 (version 23.2.0) aka Lunar Eclipse release
Codenamed: Lunar Eclipse
Read the Docs: Ocelot 23.2
What's new?
- Configuration: A brand new Merging files to memory feature by @ebjornset as a part of the Merging Configuration Files one.
TheAddOcelot
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 theIConfigurationBuilder
for the well-knownIConfiguration
. You can now call anotherAddOcelot
method that adds the merged JSON directly from memory to theIConfigurationBuilder
, usingAddJsonStream
instead.
See more details in Configuration Overview of Dependency Injection. - Service Fabric: Published old undocumented "Placeholders in Service Name" feature of Service Fabric service discovery provider.
This feature by @FelixBoers is available starting from version 13.0.0. - Quality of Service: A brand new Polly v8 pipelines Extensibility feature by @RaynaldM
Focus On
Updates of the features: Configuration, Dependency Injection and QoS
- Configuration: New Merging files to memory feature by @ebjornset
- Dependency Injection: Added new overloaded AddOcelot methods by @ebjornset
- Quality of Service: Support of new Polly v8 syntax and new Extensibility feature by @RaynaldM
Ocelot extra packages
- Ocelot.Provider.Polly: Support of new Polly v8 syntax.
Polly 8.0+ versions introduced the concept of resilience pipelines.
All AddPolly extensions have been automatically migrated from v7 to v8.
Please note that older v7 extensions are marked with the[Obsolete]
attribute and renamed using theV7
suffix. And the old v7 implementation has been moved to the v7 namespace.
See more details in Polly v7 vs v8 section of Quality of Service chapter.
Stabilization aka bug fixing
- 683 by PR 1927
New rules have been added to Ocelot's configuration validation logic to find duplicate placeholders in path templates.
See more in the FileConfigurationFluentValidator class. Thanks to @AlyHKafoury! - 1518 hotfix by PR 1986
Using the defaultIServiceCollection
DI extensions to register Ocelot services resulted in theServiceCollection
provider being forced to be created by callingBuildServiceProvider()
.
This resulted in problems with dependency injection libraries, or worse, causing the Ocelot app to crash!
See more in the ServiceCollectionExtensions class. Thanks to @ArwynFr! - See all bugs of the February'24 milestone
Documentation for version 23.2
Honoring 🏅 aka Top Contributors 👏
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
Starring ⭐ aka Release Influencers
⭐ Adrien Hupond, @ArwynFr
⭐ Aly Kafoury, @AlyHKafoury
⭐ Eirik Bjornset, @ebjornset
⭐ Raman Maksimchuk, @raman-m
⭐ Raynald Messié, @RaynaldM
Features in Release 23.2.0
Milestone: February'24
Logbook
- 334432f by Raman Maksimchuk on Friday, March 29 at 20:18 →
Release 23.2 artifacts | +semver: minor (#2022) - 4f0e483 by Aly Kafoury on Tuesday, March 26 at 14:35 →
#683 Validate placeholder duplicates in path templates (#1927) - ded4d7e by Adrien Hupond on Thursday, March 21 at 9:54 →
#1518 Create building theIServiceCollection
(#1986) - d6eefc8 by Raynald Messié on Friday, March 15 at 13:46 →
#1875 Use Polly v8 syntax (#1914) - 84bd6e4 by Eirik Bjornset on Friday, March 15 at 9:05 →
#1216 #1955 #1956 OverloadedAddOcelot
method to support merging of configuration files to memory (#1227)
23.1.0
January 2024 (version 23.1.0) aka Hornussen release
Codenamed as Hornussen Sport
Read the Docs: Ocelot 23.1
Focus On
Multiplexing middleware aka Request Aggregation feature
- Significant refactoring and design review of the Multiplexer
- Optimizing multiplexer performance:
HttpContext
is not copied when there is only one downstream route, and etc. - Fixed the bug in the multiplexer:
HttpContext.User
information was not copied if there was more than one downstream request.
System routing. Content streaming when Transfer-Encoding: 'chunked'
- Correction of the bug when creating requests: The header Transfer-Encoding:
chunked
was present even when there was no content or the request body size was 0. These cases are now addressed.
Updates of the features: QoS, Load Balancer and Error Status Codes
- Quality of Service: Possibility of implementation of custom Polly v8.2 providers. New
AddPolly
extension methods. - Load Balancer: Extension of the route key format, ensuring that the key remains unique for cases of UpstreamHost route property and ServiceName vs ServiceNamespace properties in Consul setup.
- Error Status Codes: When 413 Content Too Large, Ocelot now returns a 413
PayloadTooLargeError
(Ocelot error code41
).
Documentation for Request Aggregation
Stabilization aka bug fixing
- See all bugs of the January'24 milestone
Honoring 🏅 aka Top Contributors 👏
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
Starring ⭐ aka Release Influencers
⭐⭐ Guillaume Gnaegi, @ggnaegi
⭐ Alexander Reinert, @alexreinert
⭐ Chris Williams, @williamscs
⭐ Masoud Bahrami, @masoud-bahrami
⭐ Raman Maksimchuk, @raman-m
⭐ Raynald Messié, @RaynaldM
⭐ Steven, @sliekens
⭐ Ugway77, @Ugway77
Features in Release 23.1.0
Milestone: January'24
Logbook
- 5ec192a by Raman Maksimchuk on Monday, March 4 at 14:12 →
Release 23.1 artifacts | +semver: minor - 36986d6 by Guillaume Gnaegi on Friday, March 1 at 18:33 →
#1825 #1330 #1287 #1069 Improvements of the multiplexing middleware (#1826) - 42ac3ca by Guillaume Gnaegi on Friday, March 1 at 12:00 →
#749 Bad error handling forIOException
while reading incoming request body (#1769) - 319e397 by Alexander Reinert on Thursday, February 29 at 22:16 →
#1971 #928 Avoid content if original request has no content and avoid Transfer-Encoding: chunked if Content-Length is known (#1972) - 8845d1b by Steven on Thursday, February 29 at 9:44 →
#849 #1496 Extend the route key format used for load balancing making it unique (#1944) - 171e3a7 by Masoud Bahrami on Tuesday, February 27 at 19:05 →
Logging bug inHttpRequesterMiddleware
(#1953) - 0404c24 by Raynald Messié on Monday, February 26 at 9:24 →
#1844 More open customization of Polly use (#1974) - 108bede by Ugway77 on Thursday, February 22 at 23:38 →
#1396 Lost contextUser
inMultiplexingMiddleware
(#1462) - a9dff7c by Chris Williams on Thursday, February 22 at 4:25 →
Fix typo in the name of theDistributedCacheRateLimitCounterHandler
class (#1969)
23.0.0
November-December 2023 (version 23.0.0) aka Sunny Koliada release
Codenamed as Sunny Koliada
Read the Docs: Ocelot 23.0
Focus On
System performance. System core performance review, redesign of system core related to routing and content streaming
-
Modification of the
RequestMapper
with a brand newStreamHttpContent
class, inOcelot.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 forHttpClient
. 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 extra packages. Total 3 Ocelot packs were updated
-
Ocelot.Cache.CacheManager: Introduced default cache key generator with improved performance (the
DefaultCacheKeyGenerator
class). Old version ofCacheKeyGenerator
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 6e5471a. 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.
Middlewares. Total 8 Ocelot middlewares were updated
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 @ggnaegi
Documentation for Authentication, Caching, Kubernetes and Routing
Stabilization aka bug fixing
- See all bugs of the Nov-December'23 milestone
Testing
Honoring 🏅 aka Top Contributors 👏
1st 🥇 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
Starring ⭐ aka Release Influencers
⭐⭐⭐ Guillaume Gnaegi, @ggnaegi
⭐⭐ Raman Maksimchuk, @raman-m
⭐ Aly Kafoury, @AlyHKafoury
⭐ Igor Polishchuk, @MayorSheFF
⭐ Tanmay Seth, @ks1990cn
⭐ Zisis Tsatsas, @ZisisTsatsas
⭐ Mohsen Rajabi, @EngRajabi
Features in Release 23.0.0
Logbook
- 290fbde by Raman Maksimchuk on Tuesday, February 13 at 14:29 →
Release 23.0 | Artifacts | +semver: breaking (#1962) - a1607f5 by ZisisTsatsas on Monday, February 12 at 9:17 →
[#1527 #1529] Breaking change to the class renaming ofKube
service discovery provider (#1954) - c9510b1 by Igor on Monday, February 5 at 19:39 →
#740 #1580 Support multiple authentication schemes in one route (#1870) - f4803c2 by Aly Kafoury on Thursday, January 18 at 20:23 →
#748 Match Route configurations for upstream paths when empty Catch-All placeholders at the end of template (#1911) - 5e7e76b by Guillaume Gnaegi on Thursday, January 18 at 12:43 →
#356 #695 #1924 CustomHttpMessageInvoker
pooling (#1824) - bb79587 by Guillaume Gnaegi on Monday, December 18, 2023 at 12:54 →
#1724 Reverting back HttpClient full buffering (#1853) - ba641b2 by Raman Maksimchuk on Thursday, December 14, 2023 at 12:18 →
#1172 Default CacheKeyGenerator (#1849) - a17242d by Guillaume Gnaegi on Wednesday, December 13, 2023 at 20:42 →
#827 #1679 Improve performance of Request Mapper (#1724) - 6b1f332 by Tanmay Seth on Friday, December 8, 2023 at 5:49 →
#649 Acceptance tests (#1846) - e92b103 by Mohsen Rajabi on Thursday, October 19, 2023 at 10:40 →
Cache by header value: a new Header property in (File)CacheOptions configuration of a route (#1172)
Roadmap
We would like to share our team's plans for the future regarding: development trends, ideas, community expectations, etc.
Code Review and Performance Improvements
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.
Server-Se...
22.0.1
Hotfix release (version 22.0.1) for #1833 issue
Default timeout vs the Quality of Service feature
Special thanks to Alvin Huang!
About
The bug is related to the Quality of Service feature (aka QoS) and the HttpClient.Timeout property.
- If JSON
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. - If the
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.
Breaking Change
- The old zero value has recovered in the
FileQoSOptions
class. Make sure your custom code proper usage of theOcelot.Configuration.DownstreamRoute
class QosOptions.TimeoutValue property!
Technical info
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.
The Bug Artifacts
- Reported bug: 1833 by @huanguolin
- Hotfix PR: 1834 by @huanguolin
Starring ⭐ aka Release Influencers
⭐ Alvin Huang, @huanguolin
⭐ Raman Maksimchuk, @raman-m
Features in Release 22.0.1
21.0.0
Upgrade to .NET 8 (version 21.0.0) aka .NET 8 release
Read article: Announcing .NET 8 by Gaurav Seth, on November 14th, 2023
Read the Docs: Ocelot 21.0
About
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.
Technical info
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.
Honoring 🏅 aka Top Contributors 👏
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
Starring ⭐ aka Release Influencers
⭐ Guillaume Gnaegi, @ggnaegi
⭐ Raman Maksimchuk, @raman-m
Features in Release 21.0.0
20.0.1
Documentation release 20.0.1 for Polish Apple, v20.0
Read the Docs: Ocelot 20.0
Special thanks to @ggnaegi!
Starring ⭐ aka Release Influencers
⭐ Guillaume Gnaegi, @ggnaegi
⭐ Raman Maksimchuk, @raman-m
Features in Release 20.0.1
Logbook
20.0.0
September 2023 (version 20.0.0) aka Polish Apple release
Codenamed as Polish Apple
Read the Docs: Ocelot 20.0
Honoring 🏅 aka Top Contributors 👏
1st 🥇 goes to Raman Maksimchuk for delivering 5 features
2nd 🥈 goes to @jlukawska for delivering 3 features
3rd 🥉 goes to Guillaume Gnaegi for delivering 2 features
Starring ⭐ aka Release Influencers
⭐⭐⭐⭐⭐ Raman Maksimchuk, @raman-m
⭐⭐⭐ @jlukawska
⭐⭐ Guillaume Gnaegi, @ggnaegi
⭐ Anthony Steele, @AnthonySteele
⭐ Ben Bartholomew, @ben-bartholomew
⭐ @DanHarltey
⭐ Fabrizio Mancin, @Fabman08
⭐ Freddy, @fku-
⭐ Kevin Grossmann, @grssmnn
⭐ Marco, @eddex
⭐ Roman, @ArtRoman
⭐ Thiago Loureiro, @thiagoloureiro
⭐ Vijay Karavadra, @vijay-karavadra
⭐ guoyongchang, @guoyongchang
⭐ leonluc-dev, @leonluc-dev
⭐ zhangq, @zqlovejyc
Features in Release 20.0.0
Logbook
- 65be4b6 by raman-m on Friday, October 06 at 20:52 →
Fix Git command placeholder bug - d2f76ae by raman-m on Friday, October 06 at 19:44 →
+semver: breaking | Polish Apple release | 2nd build - adac0a2 by raman-m on Friday, October 06 at 10:20 →
Polish Apple release - fcdd274 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) - e5f31ef by Raman Maksimchuk on Monday, October 02 at 19:17 →
Follow up #1670: Fix StyleCop issues and improve the code (#1711) - e950cf2 by Ben Bartholomew on Saturday, September 30 at 14:50 →
#653 Adding null check for downstreamResponse (#1334) - 5a81cce by Freddy on Saturday, September 30 at 19:34 →
Second parameter of Substring is wrong in HeaderFindAndReplaceCreator (#1424) - 5dbbbef by Fabrizio Mancin on Saturday, September 30 at 16:26 →
#1400 Manage multiple patterns for allowed/blocked IPs via Security Options config section (#1399) - cc0b9b8 by Kevin Grossmann on Friday, September 29 at 20:42 →
Ignore port when using UpstreamHost option (#1505) - f8eb5e1 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) - ab29442 by Roman on Friday, September 29 at 11:27 →
#1509 #1683 Replace non-WS protocols for the 'ClientWebSocket' in WebSocketsProxyMiddleware (#1689) - 190b001 by leonluc-dev on Thursday, September 28 at 18:14 →
#1225 Update ServiceDiscovery documentation and samples to include Custom Providers (#1656) - fa179bf by zhangq on Thursday, September 28 at 23:04 →
#1375 #1237 #925 #920 Fix DownstreamRoute DangerousAcceptAnyServerCertificateValidator (#1377) - 5fd5bf9 by Raman Maksimchuk on Monday, September 25 at 18:00 →
#1681 'using' statements life hacks (#1682) - 8b89257 by Raman Maksimchuk on Monday, September 25 at 16:54 →
#1700 Add sequential tests with disabled parallelization (#1705) - fdad15d by Guillaume Gnaegi on Monday, September 25 at 14:15 →
#1700 Create custom Ocelot config file when instantiating steps during parallel execution (#1703) - 75cd0b3 by Raman Maksimchuk on Monday, September 25 at 10:51 →
#1677 #1686 United documentation update (#1678) - b7976fc 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) - 4d245ec by Vijay Karavadra on Saturday, September 23 at 19:19 →
#1228 #1235 #1247 Overloaded AddOcelot method for dynamic FileConfiguration construction (#1569) - 5ad807d by jlukawska on Saturday, September 23 at 11:12 →
#893 Problems to cancel a request (CancellationToken) (#1367) - b27761f by jlukawska on Saturday, September 23 at 10:43 →
#1057 #1068 Add service discovery logs (#1366) - ec85b13 by jlukawska on Friday, September 22 at 21:39 →
#1288 Query string char missing (#1335) - 8893f04 by Marco on Friday, September 22 at 21:25 →
fix: minor grammar fix in default rate limit response message (#1639) - e6081ce by Thiago Loureiro on Friday, September 22 at 21:15 →
Fixed logger message typos in the OutputCacheMiddleware class (#1315) - 21bc4a4 by DanHarltey on Friday, September 22 at 20:05 →
#908 Quality of Service - Configuration (#1279) - 455d7d3 by Anthony Steele on Friday, September 22 at 19:45 →
Exception mapper naming (#1211)
19.0.3
Read the Docs: Ocelot 19.0
ebe70fd - Raman Maksimchuk - Merge pull request #1695 from ThreeMammals/develop
a90664b - Raman Maksimchuk - Release features #1499 #1663 (#1660) (#1693)
346df03 - Tom Pallister - Update README.md
433dfca - Justin Middler - fixed up required spacing in README (#1499)
6ca54fe - Raman Maksimchuk - #1660 Huge logs because of StyleCop.Analyzers warnings (#1663)
bc25f4e - TomPallister - push code coverage for main and develop branches