akka / akka/akka-http

http: client connection pool with circuit breaker

Open
#446 4 comments 3 reactions 0 assignees View on GitHub
1 - triaged
Dominant language
Scala
Stars
1.4k
Forks
584
Avg merge
14h 33m
Merged PRs (30d)
24

Description

When using the host-level client-side API, I would find convenient to have a circuit-breakable version of a client connection pool.
It could be something like

```
def cachedHostConnectionPoolWithBreaker[T](breaker: CircuitBreaker)(...) = ???
```

Pool flows return `Try[HttpResponse]` already, so they can wrap the CB exceptions.

The CB could be wired in `clientFlow` helper method and used when the `mapAsyncUnordered` is invoked. I can take care of the PR in case this is deemed useful.

Contributor guide

Open the contributing guide

Research direction

Start by reading the host-level client-side API and the clientFlow helper, then inspect where mapAsyncUnordered invokes the connection-pool flows. Clarify the proposed circuit-breaker API and how breaker exceptions should be represented in the existing Try[HttpResponse] results. Done means an agreed circuit-breakable connection-pool design with the relevant behavior specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.