In cisco secure firewall there is a feature named connection SLA monitoring.
The details can be seen at the youtube video:
https://youtu.be/KPp3BgBKm34
I was thinking about writing a set of scripts that will monitor a WAN connection and then dynamically modify the PBR mangle rules and routing tables.
In the case that RouterOS doesn't have the relevant tools we can use an external container to implement the tests and then to use the fetch tool to extract the raw DATA.
The tests results shown in the YT video for the sla are:
* RTT
* Jitter
* Packet loss
and also application based routing.
So, to apply application based routing it's much more complicated since we need to monitor or control the DNS requests or TLS information to identify the related connections such as for example: *.youtube.com or *.yahoo.com and related domains for a specific application.
The basic way to identify youtube related destinations in RouterOS is firewall address lists and or tls sni host but these are currently not available before the connections are initiated.
Also, in the case of TLS sni, a request can be crafted for www.youtube.com but with another destination ip address like 1.1.1.1:443 etc and the RouterOS device will "think" that it's a youtube domain.
So, we need to pre-populate the address lists with domains somehow.
To find the right domains and cidrs per application or group of applications we can try to use the technical details at:
https://github.com/ntop/nDPI/
which are pretty up to date and can be used to research the relevat cidrs and domain names to create such "application" list.
Also there is another thing which I was thinking about and it's the WAN connection active state monitoring using 3 http(s) requests to microsoft/google/apple/other urls.
If even 1 of the requests are OK then the connection is up.
If all 3 of them are down then the connection is down.
The implementation will rely on couple scripts and PBR.
If anyone is interested in helping with this feel free to put some thumbs up and I am also available at the discord channels.