8000 [Http Client] Support a "Fallback strategy" into the Retryable Http client · Issue #38415 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Http Client] Support a "Fallback strategy" into the Retryable Http client #38415
Closed
@mickaelandrieu

Description

@mickaelandrieu

Description

I've just noticed that a new Http client was merged into Symfony thanks to @jderusse & @weaverryan (kuddos btw).

I've worked on Resilient applications the last two years while improving the PrestaShop CMS in my previous job and I've end up
creating our very own library that implements the Circuit Breaker design pattern: https://github.com/loveOSS/resiliency.

This design pattern decorates any (HTTP) client and implements 2 patterns:

  • the Retry pattern;
  • the Fallback pattern;

Can we imagine the declaration of a class (or an event ?) that could have the responsibility to return a response if the server is unavailable ?

This way, every Symfony (HTTP-dependent) application could be resilient by design.

Example

I'm not sure about the implementation it should have into Symfony, but this is how it works in Resiliency and in most of non PHP libraries that provide this kind of features.

Thanks for your time !

And feel free to close it if it's out of the scope of the framework/component.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0