Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gateway): answer with empty list of addresses on DNS resolution failure #4266

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

thomaseizinger
Copy link
Member

Currently, a failure during DNS resolution results in the client hanging during the connection setup. Instead, we fall back to an empty list which results in an empty DNS query result for the client.

That in turn will make most application consider the DNS request failed. As far as I know, we don't currently retry these DNS requests, meaning a user would have to sign-in and out again to fix this state.

Whilst not ideal, I think this is a better behaviour and what we currently have where the initial connection just hangs.

Copy link

vercel bot commented Mar 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
firezone ⬜️ Ignored (Inspect) Mar 22, 2024 9:18am

Copy link

Terraform Cloud Plan Output

Plan: 9 to add, 8 to change, 9 to destroy.

Terraform Cloud Plan

Copy link

Performance Test Results

TCP

Test Name Received/s Sent/s Retransmits
direct-tcp-client2server 223.3 MiB (+2%) 224.5 MiB (+1%) 283 (-9%)
direct-tcp-server2client 230.5 MiB (+3%) 231.8 MiB (+2%) 362 (-21%)
relayed-tcp-client2server 146.3 MiB (+2%) 147.0 MiB (+1%) 159 (-18%)
relayed-tcp-server2client 154.3 MiB (+4%) 154.7 MiB (+4%) 214 (+67%)

UDP

Test Name Total/s Jitter Lost
direct-udp-client2server 50.0 MiB (-0%) 0.29ms (+718%) 0.00% (NaN%)
direct-udp-server2client 50.0 MiB (-0%) 0.01ms (-14%) 0.00% (NaN%)
relayed-udp-client2server 50.0 MiB (-0%) 0.10ms (-17%) 0.00% (NaN%)
relayed-udp-server2client 50.0 MiB (-0%) 0.04ms (-20%) 0.00% (NaN%)

Ok(Err(e)) => {
tracing::warn!("Failed to resolve '{domain}': {e}");

vec![]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have a dedicated message for this, but for now maybe we need to handle it from the client-side disconnecting from the gateway.

This will be left in a weird state connected to a gateway which might have no resources associated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be superious? It prompted me to write up #4267.

@thomaseizinger thomaseizinger added this pull request to the merge queue Mar 22, 2024
Merged via the queue into main with commit e8f2320 Mar 22, 2024
138 checks passed
@thomaseizinger thomaseizinger deleted the fix/gateway/always-answer branch March 22, 2024 22:26
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.

2 participants