netmaker icon indicating copy to clipboard operation
netmaker copied to clipboard

Functionality to prioritize specific datastreams

Open stianlaa opened this issue 2 years ago • 3 comments

I'm creating this issue to highlight a usecase which I suspect others share but in different forms. A minimal example use-case is as follows:

Two processes A and B attempt to send data over a limited link, (in our case an LTE/4G modem), where the data from process A is critical to receive, and process B is a camera stream which is nice-to-have. Without netmaker/wireguard this might be resolved by defining priority between various ports in the modem/router, but as all traffic is pulled through the same port and the wireguard "tunnel" is opaque, the modem has no way of prioritizing some traffic over others giving Quality-of-services issues.

I'll provide some information of avenues we have explored below, but our desire is some solution to this Quality-of-service issue.

stianlaa avatar Mar 18 '22 11:03 stianlaa

Alternatives considered and some reflections:

  1. Run netclient on the modem itself, thereby allowing the QOS to be done on the incoming data, on port-by-port basis. This would work as our modem and lots of routers use OpenWrt, but since golang binaries are hard to make very small, we've already been exceeded the disk space on the modem. Also it involves some work on the modem, and constrains what type of hardware we can use.

  2. Create separate netmaker networks, which have their own ports. Configure the modem to prioritize one over the other. This would work, but scales poorly if we need more levels of prioritization. Also devices would have to manage multiple networks.

  3. Have a third process or some linux tool running which does the prioritization itself before the data enters the underlying wireguard tunnel. This too should work, but we are unsure about what to use, and this process doesn't automatically have any knowledge about LTE link quality.

We are far from experts when it comes to networks, so we could very well have missed some obvious and good solutions. Tips and tricks are highly valued!

stianlaa avatar Mar 18 '22 11:03 stianlaa

@stianlaa I think this is likely out of scope as a netclient enhancement. Are you more just looking for a recommendation on implementation?

afeiszli avatar Mar 25 '22 12:03 afeiszli

Hmm, I understand that it falls a bit outside the core focus of netclient. Perhaps it is a peculiar use-case we are talking about here, but most functionality which relies on differentiating data streams by port will be affected. Time will tell :smiley:

If you have some solution in mind we would be very interested. We are testing out a couple of alternatives to achieve some prioritization, but it doesn't feel that ergonomic just yet.

stianlaa avatar Mar 25 '22 12:03 stianlaa