cloud
Best-effort geolocation of a host to the cloud provider and region it runs in. Resolves the host to its IP address(es) via DNS, then matches those addresses against the public IP-range feeds each hyperscaler publishes (AWS, Azure, GCP). Handy for placing a Databricks workspace URL, but works for any host.
The range feeds are large and change slowly, so each provider’s feed is cached for RANGE_CACHE_TTL_MS (24 hours) at two layers: an on-disk copy under the OS temp dir (survives process restarts, shared across processes) plus an in-process memoized parse. A provider whose feed fails to load is skipped rather than failing the whole lookup - the other providers still answer.
Server-only: DNS resolution needs node:dns (via ./net.ts), the
disk cache needs node:fs / node:os / node:path, and the feeds
are fetched with the global fetch.