Welcome¶
Welcome to the Ocelot 23.3 documentation!
It is recommended to read all Release Notes if you have deployed the Ocelot app in a production environment and are planning to upgrade to major or patched versions.
The major version 23.3.0 includes several patches, the history of which is provided below.
Patches
23.3.3, on Jun 11, 2024. Technical release with DevOps patch.
23.3.4, on Oct 3, 2024. Hot fixing version 23.3.0, codenamed Blue Olympic Balumbes release, with codename decoding links:
for men: naked Blue Olympic Fiend
for women: not a well-dressed woman sings at the opening ceremony, so “Not Celine Dion”
for black men: enjoy Men’s Basketball Final in Paris 2024. Be proud of Stephen Curry, “just give me a ball” boy, as an absolute rockstar, made shot 1, shot 2, shot 3 and final shot 4.
23.3.5, on Oct 12, 2024. Documentation patch: Html and Pdf doc layouts.
Release Notes¶
What’s new?¶
Service Discovery: Introducing a new feature for “Customization of services creation” in two primary service discovery providers:
Consul(Consul Service Builder 3) andKubernetes(Downstream Scheme vs Port Names 3), developed by @raman-m.The customization for both
ConsulandKubeproviders in service creation is achieved through the overriding of virtual methods in default implementations. The recommendation was to separate the provider’s logic and introducepublic virtualandprotected virtualmethods in concrete classes, enabling:The use of
public virtualmethods as dictated by interface definitions.The application of
protected virtualmethods to allow developers to customize atomic operations through inheritance from existing concrete classes.The injection of new interface objects into the provider’s constructor.
The overriding of the default behavior of classes.
Ultimately, customization relies on the virtual methods within the default implementation classes, providing developers the flexibility to override them as necessary for highly tailored Consul/K8s configurations in their specific environments.Routing: Introducing the new “Upstream Headers 3” feature by @jlukawska.
In addition to routing viaUpstreamPathTemplate, you can now define anUpstreamHeaderTemplatesoptions dictionary. For a route to match, all headers specified in this section are required to be present in the request headers.For more details, see PR 1312.Configuration: Introducing the “DownstreamHttpVersionPolicy 3” feature by @ibnuda.
The configurable
HttpRequestMessage.VersionPolicyhelps avoid HTTP protocol connection errors and stabilizes connections to downstream services, especially when you’re not developing those services, documentation is scarce, or the deployed HTTP protocol version is uncertain. For developers of downstream services, it’s possible toConfigureKestrelserver and its endpoints with new protocol settings. However, attention to version policy is also required, and this feature provides precise version settings for HTTP connections.Essentially, this feature promotes the use of HTTP protocols beyond 1.0/1.1, such as HTTP/2 or even HTTP/3.For additional details, refer to PR 1673.Configuration: Introducing the new “Route Metadata” feature by @vantm.
Undoubtedly, this is the standout feature of the release! ⭐
Route metadata enables Ocelot developers to incorporate custom functions that address specific needs or to create their own plugins/extensions.
In versions of Ocelot prior to 23.3.0, the configuration was limited to predefined values that Ocelot used internally. This was sufficient for official extensions, but posed challenges for third-party developers who needed to implement configurations not included in the standard
FileConfiguration. Applying an option to a specific route required knowledge of the array index and other details that might not be readily accessible using the standardIConfigurationorIOptions<FileConfiguration>models from ASP.NET.
Updates of the features¶
Configuration: New features are “DownstreamHttpVersionPolicy 3” by @ibnuda and “Route Metadata” by @vantm.
Service Discovery: New feature is “Customization of services creation” aka Consul Service Builder 3 and Downstream Scheme vs Port Names 3 by @raman-m.
Routing: New feature is “Upstream Headers 3” by @jlukawska.
Quality of Service: The team has decided to remove the Polly V7 policies logic and the corresponding Ocelot
AddPollyV7extensions (referenced in PR 2079).Furthermore, the Polly V8 Circuit Breaker has been mandated as the primary strategy (as per PR 2086).See more detaild below in “Ocelot extra packages” paragraph.
Ocelot extra packages¶
-
Our team has resolved to eliminate the Polly V7 policies logic and the corresponding Ocelot
AddPollyV7extensions entirely (refer to the “Polly v7 vs v8” documentation). In the previous 23.2.0 release, named Lunar Eclipse, we included these to maintain the legacy Polly behavior, allowing development teams to transition or retain the old Polly V7 functionality. We are now confident that it is time to progress alongside Polly, shifting our focus to the new Polly V8 resilience pipelines. For more details, see PR 2079.Additionally, we have implemented Polly v8 Circuit Breaker as the primary strategy. Our Quality of Service (QoS) relies on two main strategies: Circuit Breaker strategy and Timeout strategy. If both Circuit Breaker and Timeout have Configuration with their respective properties in the
QoSOptionsof the route JSON, then the Circuit Breaker strategy will take precedence in the constructed resilience pipeline. For more details, refer to PR 2086.
Stabilization (bug fixing)¶
Fixed 1590 in PR 1592 by @sergio-str
Fixed 2054 2059 in PR 2058 by @thiagoloureiro
Fixed 2002 in PR 2003 by @bbenameur
Documentation Summary¶
Caching: New EnableContentHashing option and Global Configuration sections
Configuration: New DownstreamHttpVersionPolicy 3 and Route Metadata sections
Kubernetes aka K8s: New Downstream Scheme vs Port Names 3 section
Metadata: This is new chapter for Route Metadata feature
Routing: New Upstream Headers 3 section
Service Discovery: New Consul Service Builder 3 and Downstream Scheme vs Port Names 3 sections
Contributing¶
Pull requests, issues, and commentary are welcome at the Ocelot GitHub repository.
For ideas and questions, please post them in the Ocelot Discussions space.
Our development process is detailed in the Release Process documentation.