We have a video upcoming on this use-case soon. Till then just go through the below document.
NearestN in prepared query specifies that the query will be forwarded to up to NearestN other datacenters based on their estimated network round trip time using Network Coordinates from the WAN gossip pool.
Example Snippet:
"Service": { "Service": "web", "Failover": { "NearestN": 3 } }
This will attempt to find a service locally, and otherwise, attempt to find that service in the next three closest datacenters.