Comparisons

  1. Retries
    1. Failsafe-go vs cenkalti/backoff
  2. Circuit Breakers
    1. Failsafe-go vs gobreaker
  3. Hedges
    1. Failsafe-go vs cristalhq/hedgedhttp

Retries

Failsafe-go vs cenkalti/backoff

cenkalti/backoff is an expontial backoff retry implementation. It differs from Failsafe-go’s RetryPolicy in a few ways:

Circuit Breakers

Failsafe-go vs gobreaker

gobreaker is a circuit breaker implementation. It differs from Failsafe-go’s CircuitBreaker in a few ways:

  • Failsafe-go offers count-based and time-based thresholding. gobreaker offers count-based thresholding.
  • Failsafe-go’s circuit breaker provides a single interface for configuring any scenario. gobreaker has different structs for different types of circuit breaking.
  • Failsafe-go circuit breakers can threshold on recent execution results. gobreaker periodically clears execution results, losing recent data.
  • Failsafe-go circuit breakers can be configured to handle different results, errors, or conditions.
  • Failsafe-go circuit breakers can be configured with separate failure and success thresholds.
  • Failsafe-go provides several circuit breaker event listeners.
  • Failsafe-go circuit breakers can be manually operated.
  • Failsafe-go circuit breakers can be composed with other policies.

Hedges

Failsafe-go vs cristalhq/hedgedhttp

cristalhq/hedgedhttp is an HTTP hedging implemetation. It differs from Failsafe-go’s HedgePolicy in a few ways:

  • Failsafe-go hedges can be used with any type of execution. cristalhq/hedgedhttp can be used to hedge HTTP requests.
  • Failsafe-go hedges allow you to configure which results/errors to cancel outstanding hedges based on. cristalhq/hedgedhttp treats any non-error as a success.
  • Failsafe-go supports dynamic hedge delays.
  • Failsafe-go provides hedge event listeners.
  • Failsafe-go hedges can be used with a budget.
  • Failsafe-go hedges can be composed with other policies.