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