I don’t know an automatic way of doing this.

Here is what I’ve done. I’ve copied every link for FunkWhale from https://fediverse.space/instances and pasted it into the command below until I’ve found the one with the lowest latency and that’s the one that I’ll be using.

curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://audio.liberta.vip/

Testing Website Response Time for :https://audio.liberta.vip/

Lookup Time:            0.038989
Connect Time:           0.086622
Pre-transfer Time:      0.206103
Start-transfer Time:    0.282754

Total Time:             0.282889