netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Automatic load balancing/multipath routing support

Open stevefan1999-personal opened this issue 4 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Imagine if you have multiple netbird agents on private AWS, Azure networks, and on-premise respectively, can we connect in such a way that when one of the agents in AWS has bad connectivity with the on-premise network, but agents in Azure network is doing great with on-premise network, then the AWS agents would connect to the on-premise network via Azure network. An example would be easier to explain:

AWS <-> On-Premise: 5ms Azure <-> On-Premise: 5ms AWS <-> Azure: 8ms

Now if a network situation happens:

AWS <-> On-Premise: 100ms Azure <-> On-Premise: 5ms AWS <-> Azure: 8ms

Then Netbird should automatically route on-premise network via Azure! Because:

AWS <-> Azure <-> On-premise: 8 + 5 = 13ms!

There can be more metrics to consider as this simple example is based on Distance-vector routing. You can also add information such as bandwidth limits and other user-defined costs.

Describe alternatives you've considered

I have also experimented running Netbird with routing protocols such as B.A.T.M.A.N. by adding GENEVE on top of it, but the performance is not doing very well. Direct routing via BGP on top of Netbird and distribute all the routes automatically should be the best case, and while I do know this is a crazy idea, it should work in theory: a simple experiment can be done by running Calico on top of Netbird.

Although running BGP on top of Wireguard is not anything special. As a former dn42 operator (and I'm still trying to learn!) we usually use Wireguard as an encrypted transit and run BIRD on top of it to get routes and FIB.

Additional context

EIGRP should also give the best balance possible to load balance a network.

GoBGP is an implementation of BGP in Golang.

stevefan1999-personal avatar Feb 21 '24 13:02 stevefan1999-personal