I don't mean to be negative of the solution, I am just curious.
I don't mean to be negative of the solution, I am just curious.
However, in my experience latencies are not static and depend on how far away the request is sent, the type of the resource requested, the size of the resource, current network load in that direction and other factors. Which gets tricky and complicated. At some point you need to store latest latency history for each request per each size group per each resource type per each node and dynamically calculate 90th percentile latency. But then things like size may not be predictable, so you may need to cap response sizes to a sufficiently small value. And so on.
If your responses are small, it's easier to just always send two requests in parallel to different servers and choose the fastest one.