Skip to content

Commit 7c1b778

Browse files
authored
Merge branch 'release/24.0' into feature/1658---Global-UpstreamHeaderTransform-settings-in-GlobalConfiguration-section
2 parents 94297aa + 5a3c55e commit 7c1b778

File tree

4 files changed

+42
-60
lines changed

4 files changed

+42
-60
lines changed

ReleaseNotes.md

+17-41
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,39 @@
1-
## November-December 2023 (version {0}) aka [Sunny Koliada](https://www.google.com/search?q=winter+solstice) release
2-
> Codenamed as **[Sunny Koliada](https://www.bing.com/search?q=winter+solstice)**
1+
## January 2024 (version {0}) aka [Hornussen](https://www.myswitzerland.com/en-ch/planning/about-switzerland/custom-and-tradition/hornussen-where-the-nouss-flies-from-the-ramp-and-into-the-playing-field/) release
2+
> Codenamed as **[Hornussen Sport](https://www.youtube.com/results?search_query=Hornussen)**
3+
> Read the Docs: [Ocelot 23.1](https://ocelot.readthedocs.io/en/23.1.0/)
34
45
### Focus On
56

67
<details>
7-
<summary><b>System performance</b>. System core performance review, redesign of system core related to routing and content streaming</summary>
8-
9-
- 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.
10-
- Introduction of a new Message Invoker pool, in `Ocelot.Requester` namespace. We have replaced the [HttpClient](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) class with [HttpMessageInvoker](https://learn.microsoft.com/en-us/dotnet/api/system.net.http.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.
11-
- 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.
12-
- **TODO** Include screenshots from Production...
8+
<summary><b>Multiplexing middleware</b> aka <a href="https://ocelot.readthedocs.io/en/latest/features/requestaggregation.html">Request Aggregation</a> feature</summary>
9+
10+
- Significant refactoring and design review of the [Multiplexer](https://github.com/ThreeMammals/Ocelot/tree/develop/src/Ocelot/Multiplexer)
11+
- Optimizing multiplexer performance: `HttpContext` is not copied when there is only one downstream route, and etc.
12+
- Fixed [the bug](https://github.com/ThreeMammals/Ocelot/pull/1462) in the multiplexer: `HttpContext.User` information was not copied if there was more than one downstream request.
1313
</details>
1414

1515
<details>
16-
<summary><b>Ocelot extra packages</b>. Total 3 Ocelot packs were updated</summary>
17-
18-
- [Ocelot.Cache.CacheManager](https://github.com/ThreeMammals/Ocelot/tree/main/src/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.
19-
- [Ocelot.Provider.Kubernetes](https://github.com/ThreeMammals/Ocelot/tree/main/src/Ocelot.Provider.Kubernetes): Fixed long lasting breaking change being added in version [15.0.0](https://github.com/ThreeMammals/Ocelot/releases/tag/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.
16+
<summary><b>System routing</b>. Content streaming when <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding">Transfer-Encoding</a>: 'chunked'</summary>
2017

21-
- [Ocelot.Provider.Polly](https://github.com/ThreeMammals/Ocelot/tree/main/src/Ocelot.Provider.Polly): A minor changes without feature delivery. We are preparing for a major update to the package in the next release.
18+
- Correction of [the bug](https://github.com/ThreeMammals/Ocelot/pull/1972) when creating requests: The header [Transfer-Encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding): `chunked` was present even when there was no content or the request body size was 0. These cases are now addressed.
2219
</details>
2320

2421
<details>
25-
<summary><b>Middlewares</b>. Total 8 Ocelot middlewares were updated</summary>
22+
<summary><b>Updates of the features</b>: QoS, Load Balancer and Error Status Codes</summary>
2623

27-
- `AuthenticationMiddleware`: Added new [Multiple Authentication Schemes](https://github.com/ThreeMammals/Ocelot/pull/1870) feature by @MayorSheFF
28-
- `OutputCacheMiddleware`, `RequestIdMiddleware`: Added new [Cache by Header Value](https://github.com/ThreeMammals/Ocelot/pull/1172) by @EngRajabi, and redesigned as [Default CacheKeyGenerator](https://github.com/ThreeMammals/Ocelot/pull/1849) feature by @raman-m
29-
- `DownstreamUrlCreatorMiddleware`: Fixed [bug](https://github.com/ThreeMammals/Ocelot/issues/748) for ending/omitting slash in path templates aka [Empty placeholders](https://github.com/ThreeMammals/Ocelot/pull/1911) feature by @AlyHKafoury
30-
- `ConfigurationMiddleware`, `HttpRequesterMiddleware`, `ResponderMiddleware`: System upgrade for [Custom HttpMessageInvoker pooling](https://github.com/ThreeMammals/Ocelot/pull/1824) feature by @ggnaegi
31-
- `DownstreamRequestInitialiserMiddleware`: System upgrade for [Performance of Request Mapper](https://github.com/ThreeMammals/Ocelot/pull/1724) feature by @ggnaegi
24+
- [Quality of Service](https://ocelot.readthedocs.io/en/latest/features/qualityofservice.html): Possibility of implementation of custom Polly v8.2 providers. New `AddPolly` extension methods.
25+
- [Load Balancer](https://ocelot.readthedocs.io/en/latest/features/loadbalancer.html): 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.
26+
- [Error Status Codes](https://ocelot.readthedocs.io/en/latest/features/errorcodes.html): When [413 Content Too Large](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413), Ocelot now returns a 413 `PayloadTooLargeError` (Ocelot error code `41`).
3227
</details>
3328

3429
<details>
35-
<summary>Documentation for <b>Authentication</b>, <b>Caching</b>, <b>Kubernetes</b> and <b>Routing</b></summary>
30+
<summary>Documentation for <b>Request Aggregation</b></summary>
3631

37-
- [Authentication](https://ocelot.readthedocs.io/en/latest/features/authentication.html)
38-
- [Caching](https://ocelot.readthedocs.io/en/latest/features/caching.html)
39-
- [Kubernetes](https://ocelot.readthedocs.io/en/latest/features/kubernetes.html)
40-
- [Routing](https://ocelot.readthedocs.io/en/latest/features/routing.html)
32+
- [Request Aggregation](https://ocelot.readthedocs.io/en/latest/features/requestaggregation.html)
4133
</details>
4234

4335
<details>
4436
<summary><b>Stabilization</b> aka bug fixing</summary>
4537

46-
- See [all bugs](https://github.com/ThreeMammals/Ocelot/issues?q=is%3Aissue+milestone%3ANov-December%2723+is%3Aclosed+label%3Abug) of the [Nov-December'23](https://github.com/ThreeMammals/Ocelot/milestone/2) milestone
47-
</details>
48-
49-
<details>
50-
<summary><b>Testing</b></summary>
51-
52-
- The `Ocelot.Benchmarks` testing project has been updated with new `PayloadBenchmarks` and `ResponseBenchmarks` by @ggnaegi
53-
- The `Ocelot.AcceptanceTests` testing project has been refactored by @raman-m using the new `AuthenticationSteps` class, and more refactoring will be done in future releases
38+
- See [all bugs](https://github.com/ThreeMammals/Ocelot/issues?q=is%3Aissue+is%3Aclosed+label%3Abug+milestone%3AJanuary%2724) of the [January'24](https://github.com/ThreeMammals/Ocelot/milestone/4) milestone
5439
</details>
55-
56-
### Roadmap
57-
We would like to share our team's plans for the future regarding: development trends, ideas, community expectations, etc.
58-
- **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.
59-
- **Server-Sent Events protocol support**. There is a lot of community interest in this HTTP-based protocol.
60-
- **Long Polling for Consul provider**. [Consul](https://www.consul.io/) 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.
61-
- **QoS feature refactoring**. [Polly](https://github.com/App-vNext/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.
62-
- **Brainstorming** to redesign Rate Limiting, Websockets. More details in future release notes.
63-
- **Planning** of support for Swagger and gRPC proto. More details in future release notes.

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
project = 'Ocelot'
1010
copyright = ' 2016-2024 ThreeMammals Ocelot team'
1111
author = 'Tom Pallister, Ocelot Core team at ThreeMammals'
12-
release = '23.0'
12+
release = '23.1'
1313

1414
# -- General configuration ---------------------------------------------------
1515
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

docs/features/requestaggregation.rst

+23-17
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
Request Aggregation
2-
===================
1+
Request Aggregation [#f1]_
2+
==========================
33

44
Ocelot allows you to specify Aggregate Routes that compose multiple normal Routes and map their responses into one object.
55
This is usually where you have a client that is making multiple requests to a server where it could just be one.
6-
This feature allows you to start implementing back-end for a front-end (BFF) type architecture with Ocelot.
7-
8-
This feature was requested as part of `issue 79 <https://github.com/ThreeMammals/Ocelot/issues/79>`_ and further improvements were made as part of `issue 298 <https://github.com/ThreeMammals/Ocelot/issues/298>`_.
6+
This feature allows you to start implementing back-end for a front-end (BFF) type architecture with Ocelot. [#f1]_
97

108
In order to set this up you must do something like the following in your **ocelot.json**.
119
Here we have specified two normal Routes and each one has a **Key** property.
1210
We then specify an Aggregate that composes the two Routes using their keys in the **RouteKeys** list and says then we have the **UpstreamPathTemplate** which works like a normal Route.
1311
Obviously you cannot have duplicate **UpstreamPathTemplates** between **Routes** and **Aggregates**.
14-
You can use all of Ocelot's normal Route options apart from **RequestIdKey** (explained in `gotchas <#gotchas>`_ below).
12+
You can use all of Ocelot's normal Route options apart from **RequestIdKey** (explained in :ref:`agg-gotchas` below).
1513

1614
Basic Expecting JSON from Downstream Services
1715
---------------------------------------------
1816

1917
.. code-block:: json
18+
2019
{
2120
"Routes": [
2221
{
@@ -43,10 +42,7 @@ Basic Expecting JSON from Downstream Services
4342
"Aggregates": [
4443
{
4544
"UpstreamPathTemplate": "/",
46-
"RouteKeys": [
47-
"Tom",
48-
"Laura"
49-
]
45+
"RouteKeys": [ "Tom", "Laura" ]
5046
}
5147
]
5248
}
@@ -81,16 +77,23 @@ Here, you could use aggregation to get 1) all the comments, 2) attach the author
8177

8278
In concrete terms:
8379

84-
1) "/Comments" -> contains the authorId property
85-
2) "/users/{userId}" with {userId} replaced by authorId to obtain the user's details.
80+
1) ``/Comments`` contains the authorId property
81+
2) ``/users/{userId}`` with ``{userId}`` replaced by **authorId** to obtain the user's details.
82+
83+
This functionality is still in its early stages, but it does allow you to search for data based on an initial request.
8684

87-
This functionality is still in its early stages, but it does allow you to search for data based on an initial request. To perform the mapping, you need to use **AggregateRouteConfig**.
85+
To perform the mapping, you need to use **AggregateRouteConfig**:
8886

8987
.. code-block:: csharp
9088
91-
new AggregateRouteConfig{ RouteKey = "UserDetails", JsonPath = "$[*].authorId", Parameter = "userId" };
89+
new AggregateRouteConfig
90+
{
91+
RouteKey = "UserDetails",
92+
JsonPath = "$[*].authorId",
93+
Parameter = "userId"
94+
};
9295
93-
**RouteKey** is used as a reference for the route, **JsonPath** indicates where the parameter you are interested in is located in the first request response body and **Parameter** tells us that the value for authorId should be used for the request parameter userId.
96+
**RouteKey** is used as a reference for the route, **JsonPath** indicates where the parameter you are interested in is located in the first request response body and **Parameter** tells us that the value for ``authorId`` should be used for the request parameter ``userId``.
9497

9598
Register Your Own Aggregators
9699
-----------------------------
@@ -138,7 +141,7 @@ The **ocelot.json** setup is pretty much the same as the basic aggregation appro
138141
139142
Here we have added an aggregator called ``FakeDefinedAggregator``. Ocelot is going to look for this aggregator when it tries to aggregate this Route.
140143

141-
In order to make the aggregator available we must add the ``FakeDefinedAggregator`` to the ``OcelotBuilder`` being returned by ``AddOcelot()`` [#f1]_ like below:
144+
In order to make the aggregator available we must add the ``FakeDefinedAggregator`` to the ``OcelotBuilder`` being returned by ``AddOcelot()`` [#f2]_ like below:
142145

143146
.. code-block:: csharp
144147
@@ -209,6 +212,8 @@ Below is an example of an aggregator that you could implement for your solution:
209212
}
210213
}
211214
215+
.. _agg-gotchas:
216+
212217
Gotchas
213218
-------
214219

@@ -218,4 +223,5 @@ Aggregation only supports the ``GET`` HTTP verb.
218223

219224
""""
220225

221-
.. [#f1] The ``AddOcelot`` method adds default ASP.NET services to DI-container. You could call another more extended ``AddOcelotUsingBuilder`` method while configuring services to build and use custom builder via an ``IMvcCoreBuilder`` interface object. See more instructions in :doc:`../features/dependencyinjection`, "**The AddOcelotUsingBuilder method**" section.
226+
.. [#f1] This feature was requested as part of `issue 79 <https://github.com/ThreeMammals/Ocelot/issues/79>`_ and further improvements were made as part of `issue 298 <https://github.com/ThreeMammals/Ocelot/issues/298>`_. A significant refactoring and revision of the `Multiplexer <https://github.com/ThreeMammals/Ocelot/tree/develop/src/Ocelot/Multiplexer>`_ design was carried out on March 4, 2024 in version `23.1 <https://github.com/ThreeMammals/Ocelot/releases/tag/23.1.0>`_, see PRs `1826 <https://github.com/ThreeMammals/Ocelot/pull/1826>`_ and `1462 <https://github.com/ThreeMammals/Ocelot/pull/1462>`_.
227+
.. [#f2] The ``AddOcelot`` method adds default ASP.NET services to DI-container. You could call another more extended ``AddOcelotUsingBuilder`` method while configuring services to build and use custom builder via an ``IMvcCoreBuilder`` interface object. See more instructions in :doc:`../features/dependencyinjection`, "**The AddOcelotUsingBuilder method**" section.

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Welcome to Ocelot `23.0 <https://github.com/ThreeMammals/Ocelot/releases/tag/23.0.0>`_
1+
Welcome to Ocelot `23.1 <https://github.com/ThreeMammals/Ocelot/releases/tag/23.1.0>`_
22
======================================================================================
33

44
Thanks for taking a look at the Ocelot documentation! Please use the left hand navigation to get around.

0 commit comments

Comments
 (0)