Skip to content

Trip the IPFS circuit breaker only when the Kubo node is unreachable in the client #3680

Open

Description

@jpraynaud

Why

The client handles a files/stat timeout of the IPFS file downloader like an unreachable Kubo node, so a single slow answer under parallel downloads disables IPFS for all the remaining files of a Cardano database download, and the fallback to cloud storage is only reported in the logs.

What

The client stops using IPFS at once when the Kubo node cannot be connected, and only after a number of consecutive files/stat timeouts without any successful IPFS download in between, and the CLI warns the user when IPFS is disabled during a download.

How

  • Extend the timeout to 10s instead of 5s?
  • Distinguish a Kubo connection error from a files/stat timeout in the IPFS file downloader
  • Trip the IPFS circuit breaker at once on a Kubo connection error
  • Trip the IPFS circuit breaker after N consecutive files/stat timeouts, with a reset of the count on each successful IPFS download (take into consideration the number of parallel downloads)
  • Reset the circuit breaker after a delay? (Is it worth it if the download lasts 15 minutes?)
  • Expose the circuit breaker trip to the client users (e.g. through a feedback event)
  • Display a warning in the client CLI when the IPFS circuit breaker trips
  • Update the client CLI documentation of the IPFS download
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature 🚀

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions