# Circuit Breaker

Circuit Breaker is a self-hosted crypto currency app. It allows nodes to protect themselves from being flooded with HTLCs. It is open source and self-hosted, installable on Umbrel.

Canonical page: https://ourlocalhost.com/app/3527/circuit-breaker

## Description

It allows nodes to protect themselves from being flooded with HTLCs. With circuitbreaker a maximum to the number of in-flight HTLCs can be set on a per-peer basis. Known and trusted peers for example can be assigned a higher maximum, while a new channel from a previously unseen node may be limited to only a few pending HTLCs. Furthermore it is possible to apply rate limits to the number of forwarded HTLCs. This offers protection against DoS/spam attacks that rely on large numbers of fast-resolving HTLCs. Rate limiting is implemented with a Token bucket. Via the UI the minimum interval between HTLCs can be specified. Large numbers of HTLCs are also required for probing channel balances. Reducing the information leakage through probing could be another reason to put in place a rate limit for untrusted peers. Operating modes There are multiple modes in which circuitbreaker can operate. A

## Platform availability

Available on 1 of 10 platforms: Umbrel.

## Health score

18/100 (Low), based on 4 of 4 factors.
- Maintained: 0 (last commit 1003 days ago)
- Popular: 0 (0 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 70 (1 GB minimum RAM)

## Links

- Umbrel: https://apps.umbrel.com/app/circuitbreaker

## Common questions

### How should I install the PHP circuit breaker for a self-hosted app?

Install it through Composer with the package name stfn/php-circuit-breaker.

### Which storage option is recommended for most PHP applications?

The default InMemoryStorage is described as not suitable for most PHP applications. RedisStorage is described as more useful, and a custom storage implementation is also possible.

### How can I stop calls to a service temporarily?

Use forceOpenCircuit on the CircuitBreaker instance to put it into Force Open. Calls in that state throw a CircuitOpenException.

### Which failure and recovery settings can be customized?

You can customize failure_threshold, recovery_time, and sample_duration.

---
Source: Our Local Host (https://ourlocalhost.com/app/3527/circuit-breaker), the self-hosted and open-source app directory.
