Theoretical limit to advertised routes?

I’m in the middle of a prototype for setting TailScale up for my small company’s VPN solution and would like to be able to advertise routes for the public ranges of a few regions of one of the big cloud providers so we can simplify some resource access. I was able to advertise 144 ranges on a node pretty easily but this was a relatively small subset for one region. Is there a theoretical limit to the number of advertised routes on a single node? Is there likely to be any performance issues with advertising too many routes?

Related: Is there an easier way to add the routes than setting them with the --advertise-routes=xxx,yyy.zzz... parameter?

Thanks!

I’m not sure if there’s a theoretical limit to the subnets you can route beyond what the linux kernel config you are using supports. As for making a big list of subnets into a more digestible form, try editing this Go program on the Go playground: play.golang.org/p/vrjSNio9Bx-, the list of subnets ipNets will need to be customized, however this program will create the most optimized possible subnets.

I’m not having trouble optimizing the route list, I checked over the output from the API I’m calling to get them in the first place and they’re clearly doing optimizations on their end but thanks for the pointer that might come in useful someday for something else.

What I was hoping for was a config file I could update or the ability to pass a file as an argument instead of having all of them on the cmd line. I’m working on a script to read the public subnet list from the cloud’s API and construct the cmd line from that output. Then I can just schedule the script occasionally to update with the current list.

@n.stohlmann I wanted to do exactly the same. Just for Azure cloud. How did you fix it eventually ? Because I had some issues with the size of the parameters becoming an issue for bash

Turns out to have been a non-issue. I don’t remember the particulars of the issue at the time, but we’re setting the route list based on the public IP API via the cmd line and everything seems to be working great. One note: Name the nodes something that will sort last in the machine list so you don’t have to scroll through the ENTIRE route list to view any other items. I think I asked about an option to collapse that list about the same time I asked this question and it’s still not an option. (But we are otherwise still EXTREMELY happy with how this is working.)