Lowest latency algorithm

Hi,
Can you please provide a little more info on how the “Lowest Latency” algorithm works?
Does it find the lowest latency testing all WANs based on the target ip of a session or is it based on ISP response to pings on their gateway-DNS servers?

Peplink checks the round trip time for the next few hops for an estimate of the overall latency of each available WAN.