We're hoping to provide users with a list of available regions and estimated pings to each region, and then use that list to prioritize region-focused matchmaking.
We're running in to a problem where:
- The available HTTP GET request tools within Unity (WWW, UnityWebRequest, BestHTTP.HTTPRequest) do not seem suitable for measuring RTT, as they all have overhead that makes ~23ms ping regions measure as ~200+ms (and causing mis-sorting of regions due to the inaccuracy).
- Unity's built-in Ping works via the ICMP ping protocol, and Region.PingUrls (and their host IPs) do not seem to support it?
Is there a recommended way to ping these URLs from within Unity, otherwise would it be possible to enable an inbound ICMP rule on the Region Ping URL hosts (e.g. for Windows server)?
EDIT: looks like one alternative may be to create a manual mapping of regions to analogous AWS dynamodb endpoints (like CloudPing does, e.g. http://dynamodb.us-east-1.amazonaws.com/), perform a DNS lookup (which may block execution?) and then ICMP ping those IPs (e.g. 52.94.3.30). Though that feels a bit brittle as it relies on those endpoints / their firewall configuration staying the same. (EDIT 2: This does seem to give realistic RTT values, see gist)