I have a router (Linux node) connected with multiple ISPs. For e.g.
ISP1 22.214.171.124 ISP2 126.96.36.199 ISP3 188.8.131.52
At present DNS A records reports all 3 IPs. DNS is used to balance network load and for fail-over. References - Using multiple A-records for my domain - do web browsers ever try more than one? and http://blog.engelke.com/tag/browser-retry/
These 3 ISPs are the 3 major ISP located in my country.
Users should pick their own ISP network to reach to my server OR users should pick fastest path OR my DNS should send 3 IP's sorted (by fastest route) to user. There could be more ways but I guess you now understand what is required.
Even if sensing best route by DNS takes some time and it makes DNS reply slow it is OK. I can compensate this by setting high TTL.
NOTE: I cannot use GEO data, this is because all these 3 ISPs are in almost every state of my country.
Update 1: Need to put question clearly.
What application/software services can be used to calculate route with least response time so that DNS response can be sorted by response time with respect to every user?