Tailscale behind load balancer

I’m curious about this. Say I have multiple web servers behind a load balancer. For a web client point of view, they are just one server. How could I install Tailscale on the servers so that the clients can still see them as one server?

The most common way to do this is to use a load balancer server that’s public-facing, and configure it to point at multiple “backends” on your Tailscale network. A typical very basic web proxy you can use is something like nginx, but there are much more advanced load balancing proxies out there.

Thanks for the reply. I understand your suggestion, but what if the LB is not in my control? Such as my servers are EC2 and I use API Gateway or AWS ELB/ALB.

I don’t have a lot of experience with AWS’s load balancer products, but usually the way AWS products work is that they can connect to a particular VPC that you connect them to. In theory, all you should need to do is run tailscale somewhere on that VPC, then point the load balancer at that tailscale machine (which could be running nginx, etc, to connect to various other backends).

That’s clever. It’ll make it work though not perfect. The downside is that the machine running Tailscale will become the bottleneck, and it’s an extra machine.

BTW, I’d be really surprised if you are a real bot.