frankframework / frankframework/frankframework

Circuit breaker pattern implementation

Open
#9,762 5 comments 0 reactions 0 assignees View on GitHub
Needs Triage
Dominant language
Java
Stars
167
Forks
87
Avg merge
1d 2h
Merged PRs (30d)
206

Description

### Current Behavior

I want the implementation of a circuit breaker pattern to be simple.
Rate limiting = “Don’t send too many requests.”
Circuit breaker = “Stop calling something that’s broken.”

Goal: Protect your system (the caller) from repeatedly calling a failing downstream service.

### Expected Behavior

Circuit Breaker, rate-limiting / throtteling op http endpoints.

How it works:

- It monitors calls to a dependent service.
- If failures exceed a certain threshold (e.g., 50% of calls fail), it “opens the circuit” — further calls fail immediately instead of waiting for a timeout.
- After a cooldown, it “half-opens” to test if the service has recovered.

### Example:

Your app calls a payment API that starts timing out.
The circuit breaker detects repeated failures, opens the circuit, and stops calling the API for 30 seconds.

Feature | Rate Limiting | Circuit Breaker
-- | -- | --
Protects | The service from overload | The client from downstream failures
Trigger | Too many requests | Too many failures/timeouts
Action | Reject or delay requests | Stop making calls temporarily
Recovery | Automatic after time window | Half-open test, then close if healthy
Common Response | HTTP 429 | Fast-fail or fallback response

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.