flashbots / flashbots/attested-tls-proxy
Proxy client serializes requests on a single connection (no concurrency)
- Dominant language
- Rust
- Stars
- 6
- Forks
- 2
- Avg merge
- 13m
- Merged PRs (30d)
- 3
Description
This is a performance issue, and a proposed enhancement to increase throughput.
## Problem
`ProxyClient::new_with_inner` forwards all incoming requests through a single `sender` in a single async loop. Each request awaits `sender.send_request(req)` before the next is handled, which serializes all proxy traffic.
## Impact
- Throughput is capped by per‑request round‑trip time.
- Head‑of‑line blocking under concurrency.
- Even with HTTP/2 negotiated, the implementation does not drive multiplexed concurrency.
## Suggested fix
Enable concurrent sending:
- For HTTP/2, clone the sender and dispatch requests concurrently (bounded).
- For HTTP/1, consider multiple outbound connections or a small pool to parallelize.
- Keep a per‑connection concurrency limit to avoid overload.
## Acceptance criteria
- Multiple concurrent inbound requests do not block each other.
- Throughput increases in a concurrent load test (e.g., 50–200 in‑flight requests).
- No regression in response integrity or attestation metadata injection.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.