← Back to context

Comment by jedberg

2 years ago

It all depends on what you want to use it for and how accurate it needs to be.

The best way to build a geolocation service is to have a billion devices that report their location to you at the same time they report their IP to you. That's basically Apple and Google. They have by far the best geolocation databases in the world, because they get constant updates of IP and location.

The trick is basically to make an app where people willingly give you their location, and then get a lot of people to use it. That's the best way to build an accurate geo-location database, and why every app in the world now asks for your location.

4-square had the right idea, they were just ahead of their time.

Even 10 years ago, Apple internal privacy policies prevented itself from collecting precise lat/long. We had to use HTTP session telemetry to determine which endpoints were best for a given IP (or subnet, but not ASN), which informed our own pseudo-geoIP database so we knew which endpoint to connect to based on real world conditions.

Even still, it had to be as ephemeral as possible for the sake of privacy. We weren’t allowed to use or record results from Apple Maps’ reverse geo service outside of the context of a live user request (finding nearby restaurants, etc).

  • You don't need precise lat/lon to make a good database. Even a 1km circle would be more than enough.

    > but not ASN

    Why wasn't ASN allowed? That's what Netflix used to make endpoint routing decisions and worked really well.

    • You’re not wrong, but privacy concerns were paramount.

      ASNs were allowed but too vague. We needed more granularity. Corporate proxies, subdelegations, many providers aggregating announcements below /24, etc.

      1 reply →