Live data from Hacker News

Tailscale Peer Relays

tailscale.com

31–40 of 118 posts

Re: Tailscale Peer Relays

#32
post #29
post #23

What's the use case for this? It seems to be for situations where you might have a SaaS product, but there is some data required from a customer system. You'd expose the customer data using this relay and integrate into the SaaS. Is that the gist of it? Integration would still likely involve you giving the customer some software to expose a limited API and handle auth, logging, etc.

They are an alternative to the tailscale operated DERP servers, which are cloud relays. Even with the much touted NAT punching capabilities of tailscale, there are numerous instances where tailscale cannot establish a true p2p connection. The last fallback is the quite slow DERP relay and from experience it gets used very often. If you have a peer in your tailscale network that has a good connection and that maybe yo…

The explanation that I think wasn't entirely clear in the post is how it actually works/why that's better.

From what I can tell, the situation is this:

1. You have a host behind NAT

2. That NAT will not allow you to open ports via e.g. uPnP (because it's a corporate firewall or something, for example) so other tailscale nodes cannot connect to it

3. You have another host which has the same configuration, so neither host can open ports for the other to connect in

The solution is to run a peer relay, which seems to be another (or an existing) tailscale node which both of these hosts can connect to via UDP, so in this circumstance it could be a third node you're already running or a new one you configure on a separate network.

When the two NAT'ed hosts can't connect to each other, they can both opt to connect instead to this peer node allowing them to communicate with each other via the peer node.

Previously this was done via Tailscale's hosted DERP nodes; these nodes would facilitate tailscale nodes to find each other but could also proxy traffic in this hard-NAT circumstance. Now you can use your own node to do so, which means you can position it somewhere that is more efficient for these two nodes to connect to and where you have control over the network, the bandwidth, the traffic, etc.

Re: Tailscale Peer Relays

#33

This was better solved by tinc about 20 years ago. All tinc nodes can work as relays (but you can disallow that if you want), it does not rely on a centralized server, and works fine without access to the internet. It is a true mesh. The world would be better served by porting tinc to wireguard and some memory safe language instead of reimplementing parts of its functionality from scratch.

Heh. I have a 30-nodes Tinc network over the internet but some hosts are behind a NAT. It keeps randomly losing routes between these nodes. It even has the infuriating behavior that often it loses the route a few seconds after I successfully established a SSH connection.

Also, traffic seems to be decrypted and re-encrypted by relaying nodes. For end-to-end encryption, you need "ExperimentalProtocol = yes" added by Tinc 1.1, which was never formally released.

I'd like to rewrite something like it in a language I'm familiar with (perhaps based on cjdns' protocol which is better documented than Tinc's) but it's not easy.

Re: Tailscale Peer Relays

#34
Great! This feature made a lot of sense, and it took a long time.

It’s like falling back to hub and spoke, except that the traffic is end to end encrypted, and the middle node is used only when direct connection is not possible, and for some clients. It’s also similar to running your own derp server (which works also in TCP), but without the hassle of doing so, and perhaps without having to open ports to the internet (needed in derp) so long as the relay is reachable by peers.

The derp servers have low throughput. Another option could be a pay-as-you-go derp service.

They might also be on their way to remove the need for reverse proxies, with the recent announcement on Tailscale services.

BTW, why could it be paid for more than two relays? You are using just your own devices and bandwidth :)

It actually lower the bandwidth bill for Tailscale by reducing the usage of their own relays. Ideally, by default the software will find whatever nodes could help with direct connection. It’s just routing within your own network.

Re: Tailscale Peer Relays

#36
post #27

> All customers can use two peer relays, for free, forever. As your needs scale, so will the number of available peer relays. To add even more peer relays to your tailnet, come have a chat with us. I have to pay to be able to donate my own infra to make tailscale's service better?

Tailscale employee here.

I kinda doubt we'll end up charging for it (as it costs us ~nothing except support costs, which are real), but it's easier to make it free later when it's GA rather than rug pull on people and start charging for it in the future if we start it out free+unlimited.

Re: Tailscale Peer Relays

#37
post #16

Earlier quoted context omitted.

Wireguard can do what you're describing.

Wireguard can't punch through NATs or firewalls without third party software like Tailscale. Also I'm pretty sure each peer to peer connection needs to be individually set up in a config file ahead of time

A $2.5/month vps solves this issue.

Re: Tailscale Peer Relays

#39
post #27

> All customers can use two peer relays, for free, forever. As your needs scale, so will the number of available peer relays. To add even more peer relays to your tailnet, come have a chat with us. I have to pay to be able to donate my own infra to make tailscale's service better?

> to make tailscale's server better?

While I don't think that's accurate, I, too, am surprised that this feature isn't¹ completely free. After all, it will make it easier (or possible at all) for many people to use Tailscale.

¹) s/isn't/might not end up being. See https://news.ycombinator.com/item?id=45751253

Post reply on HN