Skip to content

Change to passthrough resolver#618

Merged
cvetkovic merged 1 commit intovhive-serverless:mainfrom
dhairyarungta:fix-warm-start-delay
Mar 18, 2025
Merged

Change to passthrough resolver#618
cvetkovic merged 1 commit intovhive-serverless:mainfrom
dhairyarungta:fix-warm-start-delay

Conversation

@dhairyarungta
Copy link
Contributor

@dhairyarungta dhairyarungta commented Mar 16, 2025

Title: Fix high warm start delay by using passthrough resolver

This PR addresses issue #586 where we're experiencing high warm start delays (~50ms) with gRPC connections.

When using grpc.NewClient() with just the endpoint, it defaults to DNS resolution which adds significant latency to the first connection. This behavior differs from the older grpc.Dial() method which defaulted to passthrough resolution.

Solution:
The fix is to explicitly use the passthrough resolver by prefixing the endpoint with "passthrough:///". This bypasses DNS resolution and sends the endpoint string verbatim to the dialer, which significantly reduces connection establishment time.

This change is based on the discussion in grpc/grpc-go#1786 which explains the differences between Dial and NewClient behaviors regarding resolvers.

Signed-off-by: dhairyarungta <97079960+dhairyarungta@users.noreply.github.com>
@leokondrashov leokondrashov linked an issue Mar 16, 2025 that may be closed by this pull request
@leokondrashov leokondrashov requested a review from cvetkovic March 16, 2025 10:15
@leokondrashov
Copy link
Contributor

@cvetkovic this is the fix we came up with for the grpc delays. It works well with knative setup, warm starts are ~5ms again. Can you please check with Dirigent? My concern is the format of the endpoints might be different, so simple concatenation might break the invoker in some cases.

@cvetkovic
Copy link
Contributor

@cvetkovic this is the fix we came up with for the grpc delays. It works well with knative setup, warm starts are ~5ms again. Can you please check with Dirigent? My concern is the format of the endpoints might be different, so simple concatenation might break the invoker in some cases.

Works on Dirigent!

@cvetkovic cvetkovic merged commit a35efe9 into vhive-serverless:main Mar 18, 2025
15 checks passed
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.

High warm start delay

3 participants