Skip to content

23.0.0

Compare
Choose a tag to compare
@TomPallister TomPallister released this 13 Feb 14:13
· 25 commits to main since this release
e25d473

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 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
    Prod Jan 29 Prod Jan 30 Prod Jan 31
    ~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 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 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
Documentation for Authentication, Caching, Kubernetes and Routing
Stabilization aka bug fixing
Testing
  • The Ocelot.Benchmarks testing project has been updated with new PayloadBenchmarks and ResponseBenchmarks by @ggnaegi
  • 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

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 :bowtie:

⭐⭐⭐ 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 of Kube 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 Custom HttpMessageInvoker 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-Sent Events protocol support

There is a lot of community interest in this HTTP-based protocol.

Long Polling for Consul provider

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.

QoS feature refactoring

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

Brainstorming to redesign Rate Limiting, Websockets. More details in future release notes.

Planning

Planning of support for Swagger and gRPC proto. More details in future release notes.