Skip to content

docs: reorganize the networking section #16646

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

Closed
wants to merge 19 commits into from
Closed

Conversation

EdwardAngert
Copy link
Contributor

@EdwardAngert EdwardAngert commented Feb 20, 2025

closes #16634

  • Rearrange admin/networking into a high-level "101"-style, with sub-pages that go further into the networking stack
  • Use the google doc @bpmct put together as a guide for what content goes where

preview

@EdwardAngert EdwardAngert self-assigned this Feb 20, 2025
@EdwardAngert EdwardAngert added the docs Area: coder.com/docs label Feb 20, 2025
@EdwardAngert EdwardAngert force-pushed the 16634-networking-stack branch from 056e55c to b3a1612 Compare February 20, 2025 22:15
@EdwardAngert EdwardAngert marked this pull request as ready for review February 26, 2025 21:59
Copy link
Contributor

Utilmately, I don't think this succeeds as a reorganization because it mostly grafts new content into the existing heirarchy. The new content ends up repeating information from the old content (e.g. "STUN and NAT" vs. "Underlying networking stack").

I think we need to take a hostic view of these docs and how the content should be presented. @bpmct presented some opinions about the ordering, but it needs to be expanded to include how all the existing material is incorporated into a new heirarchy.

[Tailscale's open source](https://tailscale.com) backs our websocket/HTTPS
networking logic.
[Tailscale](https://tailscale.com)'s implementation of
[Wireguard](https://www.wireguard.com/) backs our websocket/HTTPS networking logic.
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not just Wireguard, so this statement is misleading. It's too complex at this stage to explain which exact pieces of Tailscale we've embedded, though. Perhaps:

Coder establishes network connections with an embedded version of Tailscale's open source data plane.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there was some discussion recently about how to be more clear about the Wireguard and Tailscale implementations because it has led to some confusion (I can't find the issue I'm thinking of, but I see #16792 came up recently, which is different, but maybe related to how people think of the implementation when they hear "Tailscale")

I also agree that if it's more in-depth than we can squeeze into a sentence or two, we should use the simple description and link off to somewhere we explain it better. That can be the "201" section, and for now, I just used your copy and think the followup PR(s) should include that better explanation

},
{
"title": "More",
"description": "More about networking",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid being so generic here? It seems a shame to hide two titles that give a reasonable idea of what they are behind a "More" that tells you nothing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

definitely yes - current copy is a bit of a placeholder while we work through what the next page or pages entail(s)--like writing an intro after the rest of the essay, we'll be able to give it a succinct description once we know what story we're trying to tell.

[Premium](https://coder.com/pricing#compare-plans) feature that allows you to
provide low-latency browser experiences for geo-distributed teams.

### Direct connections
Copy link
Contributor

Choose a reason for hiding this comment

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

Direct vs relayed connections are not a sub-topic of Geo-distribution. They are fundamental to how Coder networking operates, even in a single geographic region.

@EdwardAngert
Copy link
Contributor Author

EdwardAngert commented Mar 10, 2025

Ultimately, I don't think this succeeds as a reorganization because it mostly grafts new content into the existing hierarchy. The new content ends up repeating information from the old content (e.g. "STUN and NAT" vs. "Underlying networking stack").

I think we need to take a holistic view of these docs and how the content should be presented. @bpmct presented some opinions about the ordering, but it needs to be expanded to include how all the existing material is incorporated into a new hierarchy.

@spikecurtis @bpmct - I see this PR as our first move at separating the 101 from the 201+ and I can see it going through three stages:

  1. (this PR) Separate the intro/getting started from the more complex - give the sections places to live that make sense

  2. Develop the intro into what people often ask for, and deliver it in a digestible, friendly landing page doc

  3. Build out the more in-depth descriptions and next-level structure. This can happen at the same time as -2, but I'm listing it separately so that neither one blocks the other.

    There's a lot that we can dive deeper into in terms of more advanced networking questions, and I want to be able to treat them as sections.

I'm re-reading this and it seems like I'm trying to disagree without disagreeing, but I think the theme I'm going for is more "yes, and" - since there are so many rabbit holes we could follow, let's treat it holistically and let's err on the side of more PRs/iterations. I hope this also gives us a chance to solicit more contributions from the team

@EdwardAngert
Copy link
Contributor Author

from @deansheather (🙌 ) on support ticket

  • workspace proxy

    We recommend having the workspace nodes as close to the user as possible, then putting workspace proxies in the same datacenter as the workspace nodes. Just keep in mind that the round-trip time for proxied connections is RTT(user <=> proxy) + RTT(proxy <=> workspace), so you want to keep both as low as possible

  • control plane considerations

    It's fine if the control plane is in a separate region to workspaces. Just keep in mind that the control plane performs the functions of a workspace proxy, so the same RTT argument applies. CLI connections will try all proxies to determine the best one to use

  • how does DERP fit into this

    DERP is a relay protocol that lets the client exchange wireguard packets with the agent. It's used if the two peers can't establish a direct UDP connection for whatever reason (usually firewalls or NATs). The control plane and workspace proxies act as a DERP server, so in the cases that direct connections can't be established all data will flow through the control plane or a proxy.

    You can tell if you're connected directly (aka. p2p) or which DERP you're connected to using coder ping $workspace

@spikecurtis
Copy link
Contributor

(this PR) Separate the intro/getting started from the more complex - give the sections places to live that make sense

I don't agree that this PR succeeds on those terms. The sections don't make sense to me, and it doesn't closely follow Ben's 101, 201, etc progression. Let's schedule a time to chat with me, @EdwardAngert and @bpmct -- possibly during our Architecture Review Board meeting.

@github-actions github-actions bot added the stale This issue is like stale bread. label Mar 19, 2025
@github-actions github-actions bot closed this Mar 23, 2025
@EdwardAngert EdwardAngert removed the stale This issue is like stale bread. label Mar 28, 2025
@EdwardAngert EdwardAngert reopened this Mar 28, 2025
@github-actions github-actions bot added the stale This issue is like stale bread. label Apr 5, 2025
@github-actions github-actions bot closed this Apr 8, 2025
@EdwardAngert
Copy link
Contributor Author

reopen and start with 101

  • inbound/outbound port reqs (what ports need to be open on the deployment)

@EdwardAngert EdwardAngert reopened this Apr 9, 2025
@EdwardAngert EdwardAngert removed the stale This issue is like stale bread. label Apr 9, 2025
@github-actions github-actions bot added the stale This issue is like stale bread. label Apr 17, 2025
@github-actions github-actions bot closed this Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Area: coder.com/docs stale This issue is like stale bread.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: describe the networking stack better
2 participants