Skip to content

Add a warm connection pool for TCP tunnel proxy - #184

Open
ameba23 wants to merge 1 commit into
mainfrom
peg/connection-pool
Open

ameba23 wants to merge 1 commit into
mainfrom
peg/connection-pool

Conversation

@ameba23

@ameba23 ameba23 commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Adds an optional warm connection pool to the TCP tunnel client, reducing connection setup latency by preparing TLS and attestation ahead of source connections.

This means that when it is configured, client connections do not need to wait for TLS handshake or attestation.

It is disabled by default - a pool size of zero preserves existing behavior.

It has configurable pool size, maximum connection age, and refill concurrency.

Connections to the target service are immediately opened and held open. This is something i might change. For gRPC we probably don't want this - we can connect to the target service as soon as the source client sends a request, and this would probably make things simpler. But worth noting that for protocols where the server speaks first (eg: SSH) this wont work, as the server can start sending data before there is a client who will receive it.

@ameba23
ameba23 added this pull request to stack #185 October 2, 2026 08:02
Base automatically changed from peg/tcp-tunnel-2 to main October 6, 2026 09:01
@ameba23
ameba23 force-pushed the peg/connection-pool branch from fcb30de to 8634c61 Compare October 6, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant