cloudflare / cloudflare/pingora
`LoadBalancer` and `Backends` interface are `SocketAddr` oriented, while `ProxyHttp::upstream_peer()` is `HttpPeer` oriented
- Dominant language
- Rust
- Stars
- 27.4k
- Forks
- 1.7k
- Avg merge
- 6h 22m
- Merged PRs (30d)
- 3
Description
## What is the problem your feature solves, or the need it fulfills?
The examples of `LoadBalancer` are oriented around `SocketAddr`s, e.g. addr+ports. This includes the constructor of `LoadBalancer`, as well as the interfaces of `Backends`.
However, when using `LoadBalancer` as a part of a `ProxyHttp` implementation, the Service is expected to provide an `HttpPeer`, which includes additional information, such as TLS+SNI information.
Is the recommended usage of `LoadBalancer` to obtain the socketaddr from the selection process, then do a second mapping of `SocketAddr` to `HttpPeer`s?
## Describe the solution you'd like
I'm guessing the intent here is to support both TCP and HTTP load balancing, though I'm unsure what the intended use was for this.
I'm going to start looking into this, but wanted to raise it in case I'm just looking at it incorrectly.
## Additional context
CC https://github.com/memorysafety/river/issues/39
Contributor guide
Assessment
This issue has not been assessed yet.