← Back to context

Comment by emadda

2 years ago

Does anyone know how accurate Cloudflare geolocation is (for workers requests)?

As accurate as MaxMind[1], since that's what they use [2]. In my experience, it's reasonably accurate for the US, less so for other countries. MaxMind publishes some accuracy data which might be an interesting starting point [3]

That said, for any analytics use cases of this data, be aware that MaxMind will group a lot of what should be unknowns in the middle of a country. Or, in the case the US now, I think they all end up in the middle of some lake, since some farm owners in Butler County, Kansas got tired of cops showing up and sued MaxMind. It can cause odd artifacts unless you filter the addresses out somehow.

1 https://developers.cloudflare.com/support/network/configurin...

2 https://www.maxmind.com/en/geoip-demo

3 https://www.maxmind.com/en/geoip2-city-accuracy-comparison

  • Yeah, MaxMind is the best I have used with caveats. You need to update it frequently, and you need to allow for overrides.

I work for IPinfo and we do ping based geolocation. The best thing you can do to verify geolocation accuracy is the following:

- Download a few free IP databases - Generate a random list of IP addresses - Do the IP address lookups across all those databases - Identify the IP address that can be pinged - Visit a site that can ping an IP address from multiple server - Sort the results by lowest avg ping time

Then check where the geolocation provider is locating the IP address and what is the nearest server from there.

  • On one hand, I love that there’s some good alternatives in the geolocation space, but misleading geolocation precision can lead to very undesirable side effects[0].

    [0] https://www.theguardian.com/technology/2016/aug/09/maxmind-m...

    • That is part of the reason why I am here in HN. I am pretty down to earth and willing to talk with anyone about IP metadata.

      Our business approach is that we will come to you before you come to us. Whenever people complain about something related to IP data, I will just reach out to them and verify that we provide good data. Our support team is extremely responsive. We also have a community where we walk through users about IP metadata. I am super active on HN, Reddit and Twitter.

      The challenge for me is usually that we will tell people, "We are providing good geolocation data for you, but the service that provides geolocation data to the service you are complaining about is not using our data. Our hands are tied." I have reached out to bigger corporations and streaming services to say, "You are providing bad data to your customers. I am not even trying to sell you something. Even using our free database could lead you to better results." But I have not heard from them yet. It is frustrating to me as it is for the person with bad IP data.

      IP geolocation is never going to be absolutely accurate or precise. We understand that completely. Aside from continuously investing in improving our data from a product standpoint, we also take a very human approach of trying to fix every geolocation complaint one by one.