-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating new strategies #114
Comments
Happy to help by the way but I suspect the changes needed may be breaking changes so just thought I'd gather feedback first |
@ackintosh would love to get your thoughts on this 😄 |
@maxbaldanza Sorry to meddle - I was investigating similar idea, but it seams that new strategy is not necessary to have same functionality. Our approach is to wait for request to complete, check the response time and if it is longer than acceptable (per example, 10s and we expected 2 or less) we report that as failure. Logic behind that is that endpoint is obviously in serious problem and it will probably crash very soon, so we are backing off earlier to give it a breather. For this, we are using custom guzzle middleware. Does this have any value to you? Please, share your thoughts - do you have different idea? Thanks :) |
Thanks for reaching out @TheCelavi, it's always great to hear how others have solved the same problem 🙌 I think the approach you have there sounds great. Either way, I think my point is still valid that it'd be great to be able to be able to create new strategies which doesn't seem possible at the minute because of the way a lot of things are not extendible. |
Hi,
Great package 🙌
We'd like to create a new strategy that opens the circuit if a request takes too long for example if a request took longer then 5s X times in X seconds. One way to achieve this is to set the timeout in Guzzle/http client which would throw an exception but the problem with this is that we want the request to continue to process rather than throw an exception after a certain timeout.
Therefore we we're thinking of creating a new Strategy that would track the time it took to process and either say success/failure based on this time.
The problem we have is how we set the
Configuration
for this timeout because this gets passed to the service but the configuration for this Strategy will be different to the existing ones. Any plans/thoughts on how to change the configuration for new strategies?The text was updated successfully, but these errors were encountered: