Query regarding QoSOptions
implemention in version 23.2+
#2112
-
Hello everyone, We are currently experiencing difficulties while trying to implement QoS with Polly V8 in version 23.3.3. Under Polly V7 version 23.2.2: JSON Configuration: "QoSOptions": {
"ExceptionsAllowedBeforeBreaking": 3, // Number of retries before circuit breaker opens
"DurationOfBreak": 15000, // Duration in milliseconds the circuit breaker will be open, sending back a 503
"TimeoutValue": 5000 // Duration in milliseconds waiting for a response before a timeout occurs
} Program. cs Configuration: services.AddJwtAuthentication();
services.AddOcelot().AddPollyV7(); Behavior Of QoSOptions with Polly V7: We would appreciate your help in generating the scenario mentioned above for implementing the QoS circuit breaker with Polly V8 in version 23.3.3 since it is not clearly explained in the Polly documentation. Is it possible to implement the circuit breaker strategy and the timeout strategy together? Is there any workaround regarding this issue? Also, How can we implement the QoS behavior of Polly v7 in Polly v8? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
hi @RaynaldM can you please guide me on the same? |
Beta Was this translation helpful? Give feedback.
-
Hello Ankit!
I'm not sure why you're researching the previous version 23.2 vs Polly v7. It would be better to migrate to the new version 23.3 vs Polly v8. Our team's intentions have been explained in the Ocelot extra packages section of the Release Notes.
It's unusual! We already manage timeout exceptions in the configuration of the Circuit Breaker strategy: Can you specify which exceptions you're referring to? What are the exact types? Additionally, we log Could you modify the logging settings to utilize the Information level to view the provider's messages?Please examine your logs for specific messages and provide us with the complete request log.
The details are outlined in our Quality of Service documentation. However, it seems you might have some customizations for the QoS feature, correct? Without seeing your solution, it's challenging to offer specific advice. If your scenario involves both strategies, please review the Configuration section again. I'm concerned that your configuration's Should you require behavior that deviates from the default, you'll need to create your own provider utilizing the Extensibility feature.
Indeed, it is possible to implement both the circuit breaker and timeout strategies concurrently. For guidance, consult the Configuration section in the documentation. Remember, you must define all three properties to activate both strategies.
To address this issue, I suggest the following:
Seems you have to implement your own QoS provider using the Extensibility feature.
Keep in mind that we no longer support Polly v7❗ The Polly library released version 8 in the previous year, 2023. It makes no sense to develop using Polly v7, which is why we have removed the v7 logic and provider.
Our official documentation already contains sufficient information and links to Polly for implementing QoS in Ocelot solutions. Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Hi @raman-m, |
Beta Was this translation helpful? Give feedback.
-
@ggnaegi wrote on Jul 19, 2024
Alright, Gui, you told me here... I now have a clearer understanding of the timeout logic 😇 and it appears we can replace our custom TimeoutDelegatingHandler with the SocketsHttpHandler class. Does that sound good? I propose the following task → TODO: Implement Timeout Logic Using the SocketsHttpHandler ClassWe need to utilize the following properties: |
Beta Was this translation helpful? Give feedback.
Hello Ankit!
I'm not sure why you're researching the previous version 23.2 vs Polly v7. It would be better to migrate to the new version 23.3 vs Polly v8. Our team's intentions have been explained in the Ocelot extra packages section of the Release Notes.
Support for version 23.2 will be discontinued. Our release strategy focuses on developing new versions without maintaining older ones.