Closed stutiredboy closed 6 years ago
No, not yet. It should be a relatively small change though.
They don't have an ASN database in the new format yet.
http://dev.maxmind.com/geoip/geoip2/whats-new-in-geoip2/ says:
Autonomous System Number In GeoIP Legacy, this was returned as a string like "AS1239 Linkem IR WiMax Network". This has been split into two keys, autonomous_system_number, an integer, and autonomous_system_organization, which is a string.
It seems the ASN data is merged with the two geolite2 databases, and using the new tokens.
I was wondering if the plan is to develop to support both formats?
Nice; I didn't realize this was in the new format.
Yeah, I think it'd be nice to support the new format instead of using abh/geoip. Hopefully it could be done with a package that doesn't use cgo, too.
I'd like to see benchmarks before switching though.
I came across this thread and was a bit curious about the relative speed myself. I made a simple benchmark for country lookups using my maxminddb package. Here are the results on my machine:
PASS
Benchmark_GetCountry-8 500000 2601 ns/op
BenchmarkMaxMindDB-8 500000 2744 ns/op
ok test 2.753s
If you use a static IP, the results are again similar but about 1000 ns/op less.
As for ASN, there isn't a free ASN database for GeoIP2, but it is included with the ISP database.
https://support.maxmind.com/geolite-legacy-discontinuation-notice/
I guess we won't be able to use the GeoIP legacy one January 2, 2019
Is there a plan to support the new Lite2 format?
Yeah, it is supported in the 3.0 branch.
you mean the 'dev' branch right as I tried building using the 3.0 branch and its still using libGeoIP.so.1 ?
I was unable to build the dev branch - any instructions for doing that?
Oh, yeah - dev sounds right!
@AnoopAlias Why didn't dev build for you? Can you open a new issue for that?
Fixed in 5048bc60, ecb34ab4, 26ba43ddad and 06a109192 (and maybe others).
Thanks.