PHP library

Reqtide PHP

A PHP library that wraps a callable in one pipeline: a total deadline, retries with a budget, a rate limit, a circuit breaker, a bulkhead and a fallback. State can be shared between processes with Redis, and there is an integration for Guzzle.

On this page

What it does

  • One pipeline. A total deadline, retries paid from a budget, a rate limit, a circuit breaker, a bulkhead and an optional fallback, in a fixed order.
  • Safe retries. Nothing is sent twice unless you say that repeating the call is safe.
  • Typed failures. Every refusal has a reason code and a Problem document that you can log.
  • Virtual time. Tests run on a virtual clock, so they never sleep.
  • Shared state. The Redis package lets several PHP processes obey one limit, one circuit and one bulkhead.
  • Guzzle. The Guzzle package adds the same rules around HTTP requests.

Install

The packages are on Packagist (version 0.1.0, beta). The steps are in Install.

Bash
composer require enaxon/reqtide enaxon/reqtide-redis enaxon/reqtide-guzzle

Privacy and data

QuestionAnswer
Does it collect data?No. The library sends nothing to the author.
Does it use the network?Only when you add the Redis package or the Guzzle package, and only to the servers you configure.
What does it keep?Counters and permits in memory, or in your Redis server. It never stores request bodies, headers or URLs.

Guides

Feedback

Found a bug or have an idea? Tell me here. I read every message.

What do you want to send?

A short example that shows the problem helps most. Do not paste passwords, keys or personal data. Remove them from logs and screenshots first.

I use it only to answer this message.

Have an account? Sign in to follow the status of your reports.