René's URL Explorer Experiment


Title: Switch to Tailscale for agent networking · Issue #2779 · coder/coder · GitHub

Open Graph Title: Switch to Tailscale for agent networking · Issue #2779 · coder/coder

X Title: Switch to Tailscale for agent networking · Issue #2779 · coder/coder

Description: Problem Users have been reporting connection issues: #2497 #2769 #2658 #2845 Some additional issues that haven't been reported: Throughput is ~30mb/s (improving seems like it'd require substantial effort) The initial connection takes a f...

Open Graph Description: Problem Users have been reporting connection issues: #2497 #2769 #2658 #2845 Some additional issues that haven't been reported: Throughput is ~30mb/s (improving seems like it'd require substantial ...

X Description: Problem Users have been reporting connection issues: #2497 #2769 #2658 #2845 Some additional issues that haven't been reported: Throughput is ~30mb/s (improving seems like it'd require subs...

Opengraph URL: https://github.com/coder/coder/issues/2779

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Switch to Tailscale for agent networking","articleBody":"### Problem\r\nUsers have been reporting connection issues:\r\n- https://github.com/coder/coder/issues/2497\r\n- https://github.com/coder/coder/issues/2769\r\n- https://github.com/coder/coder/issues/2658\r\n- https://github.com/coder/coder/issues/2845\r\n\r\nSome additional issues that haven't been reported:\r\n- Throughput is ~30mb/s (improving seems like it'd require substantial effort)\r\n- The initial connection takes a few hundred milliseconds (I believe @mafredri reported this actually)\r\n\r\nAnd the debt we take on:\r\n- Maintaining ~3000 lines of networking code that requires very specific domain knowledge to edit\r\n- Intermittent disconnects have been occurring, and due to a lack of domain knowledge we have limited throughput to debug them\r\n\r\n### Definition of Done\r\nOur current networking stack with WebRTC is not durable, fast, or resilient. To fix all the issues listed, I propose we switch to using Tailscale's OSS implementation on top of Wireguard. This will remove a significant portion of our effort being spent on networking, and let us focus on improving the fundamentals where we have higher leverage.\r\n\r\nRead this blog post by Tailscale to understand how it works: https://tailscale.com/blog/how-tailscale-works/\r\n\r\nA proof of concept and partial implementation are merged into the product under a hidden flag for SSH: `coder config-ssh --wireguard`. It appears to resolve the problems listed above. The code can be [viewed here](https://github.com/coder/coder/tree/wgnet).\r\n\r\n### FAQ\r\n\r\n#### How do users upgrade from WebRTC to Wireguard?\r\n\r\nOnce we remove WebRTC, agents will be unable to connect to Coder. Those endpoints will be removed, and workspaces will require a stop -> start to begin working again. This could be eased by doing over a few releases, but I think making it explicit in the release notes would be better.\r\n\r\n#### Does this talk to Tailscale's hosted offering at all?\r\n\r\nNope. A DERP server is embedded in the Coder server, just like how TURN has worked. A user could add the Tailscale DERP mapping to their Coder deployment to enable this proxying, and we'll allow that in the future.\r\n\r\n#### How does this change our architecture?\r\n\r\nThe architecture diagram [here](https://coder.com/docs/coder-oss/latest/architecture) stays *exactly* the same. DERP is used instead of TURN, but it already uses HTTP(s) as the protocol. This should simplify and reduce proxying.\r\n\r\n#### Does this still require significant domain knowledge to edit?\r\n\r\nYes, but the amount of code reduces substantially and the architecture maintains the same shape. The surface area of this problem should reduce.\r\n\r\n#### Does this prevent us from using WebRTC from the browser for P2P connections in the future?\r\n\r\nYes, but due to our TURN over WebSockets proxying that hasn't been possible.\r\n\r\n#### How long will we dogfood the Tailscale networking before removing WebRTC?\r\n\r\nIt's very similar architecturally, so it's not expected we'll run into significant hurdles. We'll make this the default on dogfood over break, and will likely cut a new release containing it as default the week we're back. We've been dogfooding it on dev.coder.com for ~1 week already.\r\n\r\n#### Does Wireguard require anything in the kernel?\r\n\r\nNope. Tailscale uses [wireguard-go](https://github.com/WireGuard/wireguard-go) in userspace.\r\n\r\n#### How do multiple regions work?\r\n\r\nJust as Tailscale describes in their post. Users will specify a region name for each of their Coder instances (in an HA deployment), and they will mesh together.\r\n\r\n#### What firewall ports are required?\r\n\r\nIt's just exposing an HTTP(s) server, nothing extra!\r\n\r\n#### Does this require an external IP address? (if workspaces are running on the same node as Coder)\r\n\r\nNope. Just like the current networking stack, everything should _just work_ locally too.","author":{"url":"https://github.com/kylecarbs","@type":"Person","name":"kylecarbs"},"datePublished":"2022-07-01T16:21:24Z","url":"https://github.com/coder/coder/issues/2779"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6c4bb208-c3f5-fe2e-576d-904f4db2843c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idADD8:2D40DE:19CF4B5:20CD875:6B0189B6
html-safe-nonce16506ae9ccc5451721121fc2bee1a94fd762c2b67759ed5afb2409ba6a6c5ca8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBREQ4OjJENDBERToxOUNGNEI1OjIwQ0Q4NzU6NkIwMTg5QjYiLCJ2aXNpdG9yX2lkIjoiMTU3NjE5MDUyMzgxMDQ3MjIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac8473783e8caa7de58376cdd8fe0908348558ace3622eef6dd911dc03fb6736f8
hovercard-subject-tagissue:1291600033
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/2779/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2b15afa65008c0862dbcbeec055016b8c3c1c21c52df50b318c5cd358a9c4fbf/coder/coder/issues/2779
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2b15afa65008c0862dbcbeec055016b8c3c1c21c52df50b318c5cd358a9c4fbf/coder/coder/issues/2779
og:image:altProblem Users have been reporting connection issues: #2497 #2769 #2658 #2845 Some additional issues that haven't been reported: Throughput is ~30mb/s (improving seems like it'd require substantial ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekylecarbs
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/2779#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F2779
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F2779
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/2779
Reloadhttps://github.com/coder/coder/issues/2779
Reloadhttps://github.com/coder/coder/issues/2779
coderhttps://github.com/coder
coderhttps://github.com/coder/coder
Codehttps://github.com/coder/coder
Issues320 (320)https://github.com/coder/coder/issues
Pull requests470 (470)https://github.com/coder/coder/pulls
Discussionshttps://github.com/coder/coder/discussions
Actionshttps://github.com/coder/coder/actions
Projectshttps://github.com/coder/coder/projects
Security and quality49 (49)https://github.com/coder/coder/security
Insightshttps://github.com/coder/coder/insights
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/2779
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/2779
Switch to Tailscale for agent networkinghttps://github.com/coder/coder/issues/2779#top
https://github.com/kylecarbs
EEhttps://github.com/coder/coder/milestone/9
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issue-1291600033
ssh handshake failed #2497https://github.com/coder/coder/issues/2497
Bug in v0.7.6 a494489: web terminal gets disconnected after about 1 min. of inactivity #2769https://github.com/coder/coder/issues/2769
Bug still in 0.8.5 (1st reported in v0.7.4 3f97767): coder port-forward and localhost:3000 freezes if web app source code is updated #2658https://github.com/coder/coder/issues/2658
Bug in v0.7.6 a494489: inconsistency of code-server terminal loading. #2845https://github.com/coder/coder/issues/2845
@mafredrihttps://github.com/mafredri
https://tailscale.com/blog/how-tailscale-works/https://tailscale.com/blog/how-tailscale-works/
viewed herehttps://github.com/coder/coder/tree/wgnet
herehttps://coder.com/docs/coder-oss/latest/architecture
wireguard-gohttps://github.com/WireGuard/wireguard-go
kylecarbshttps://github.com/kylecarbs
on Jul 1, 2022https://github.com/coder/coder/issues/2779#event-6919699075
https://github.com/mafredri
mafredrihttps://github.com/mafredri
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172536621
tailscale/tailscale#3157https://github.com/tailscale/tailscale/issues/3157
https://github.com/ntimo
ntimohttps://github.com/ntimo
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172555337
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172558415
@ntimohttps://github.com/ntimo
https://github.com/ketang
ketanghttps://github.com/ketang
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172568261
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Jul 1, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172574844
https://github.com/ketang
ketanghttps://github.com/ketang
on Jul 2, 2022https://github.com/coder/coder/issues/2779#issuecomment-1172952275
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Jul 18, 2022https://github.com/coder/coder/issues/2779#issuecomment-1188123064
https://github.com/spikecurtis
spikecurtishttps://github.com/spikecurtis
on Jul 19, 2022https://github.com/coder/coder/issues/2779#issuecomment-1189543872
https://github.com/spikecurtis
spikecurtishttps://github.com/spikecurtis
on Jul 19, 2022https://github.com/coder/coder/issues/2779#issuecomment-1189544680
ammariohttps://github.com/ammario
bughttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22bug%22
featurehttps://github.com/coder/coder/issues?q=state%3Aopen%20label%3A%22feature%22
on Aug 18, 2022https://github.com/coder/coder/issues/2779#event-7216674068
ammariohttps://github.com/ammario
EEhttps://github.com/coder/coder/milestone/9
on Aug 22, 2022https://github.com/coder/coder/issues/2779#event-7233225453
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Sep 2, 2022https://github.com/coder/coder/issues/2779#issuecomment-1235929049
https://github.com/sharkymark
sharkymarkhttps://github.com/sharkymark
on Sep 10, 2022https://github.com/coder/coder/issues/2779#issuecomment-1242795956
@kylecarbshttps://github.com/kylecarbs
https://github.com/kylecarbs
kylecarbshttps://github.com/kylecarbs
on Sep 10, 2022https://github.com/coder/coder/issues/2779#issuecomment-1242796043
@sharkymarkhttps://github.com/sharkymark
https://github.com/bpmct
bpmcthttps://github.com/bpmct
on Sep 16, 2022https://github.com/coder/coder/issues/2779#issuecomment-1249592555
bpmcthttps://github.com/bpmct
completedhttps://github.com/coder/coder/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 16, 2022https://github.com/coder/coder/issues/2779#event-7404765630
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/2779
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/2779
kylecarbshttps://github.com/kylecarbs
EEhttps://github.com/coder/coder/milestone/9
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.