[GH-ISSUE #66] Is MaxMind mmdb supported? #199

Closed
opened 2026-03-01 17:24:30 +03:00 by kerem · 10 comments
Owner

Originally created by @stutiredboy on GitHub (Jul 2, 2015).
Original GitHub issue: https://github.com/abh/geodns/issues/66

Thanks.

Originally created by @stutiredboy on GitHub (Jul 2, 2015). Original GitHub issue: https://github.com/abh/geodns/issues/66 Thanks.
kerem closed this issue 2026-03-01 17:24:30 +03:00
Author
Owner

@abh commented on GitHub (Jul 2, 2015):

No, not yet. It should be a relatively small change though.

They don't have an ASN database in the new format yet.

<!-- gh-comment-id:118118501 --> @abh commented on GitHub (Jul 2, 2015): No, not yet. It should be a relatively small change though. They don't have an ASN database in the new format yet.
Author
Owner

@skyred commented on GitHub (Sep 4, 2015):

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?

<!-- gh-comment-id:137633603 --> @skyred commented on GitHub (Sep 4, 2015): 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?
Author
Owner

@abh commented on GitHub (Sep 6, 2015):

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.

<!-- gh-comment-id:138012868 --> @abh commented on GitHub (Sep 6, 2015): 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.
Author
Owner

@oschwald commented on GitHub (Sep 9, 2015):

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.

<!-- gh-comment-id:138765101 --> @oschwald commented on GitHub (Sep 9, 2015): I came across this thread and was a bit curious about the relative speed myself. I made a [simple benchmark](http://play.golang.org/p/9fAy4Irq4F) for country lookups using my [maxminddb package](https://github.com/oschwald/maxminddb-golang). 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.
Author
Owner

@AnoopAlias commented on GitHub (Feb 6, 2018):

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?

<!-- gh-comment-id:363436415 --> @AnoopAlias commented on GitHub (Feb 6, 2018): 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?
Author
Owner

@abh commented on GitHub (Feb 6, 2018):

Yeah, it is supported in the 3.0 branch.

<!-- gh-comment-id:363470123 --> @abh commented on GitHub (Feb 6, 2018): Yeah, it is supported in the 3.0 branch.
Author
Owner

@AnoopAlias commented on GitHub (Feb 7, 2018):

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?

<!-- gh-comment-id:363655814 --> @AnoopAlias commented on GitHub (Feb 7, 2018): 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?
Author
Owner

@abh commented on GitHub (Feb 7, 2018):

Oh, yeah - dev sounds right!

<!-- gh-comment-id:363661471 --> @abh commented on GitHub (Feb 7, 2018): Oh, yeah - dev sounds right!
Author
Owner

@abh commented on GitHub (Feb 7, 2018):

@AnoopAlias Why didn't dev build for you? Can you open a new issue for that?

<!-- gh-comment-id:363695665 --> @abh commented on GitHub (Feb 7, 2018): @AnoopAlias Why didn't dev build for you? Can you open a new issue for that?
Author
Owner

@abh commented on GitHub (Feb 7, 2018):

Fixed in 5048bc60, ecb34ab4, 26ba43ddad and 06a109192 (and maybe others).

<!-- gh-comment-id:363695990 --> @abh commented on GitHub (Feb 7, 2018): Fixed in 5048bc60, ecb34ab4, 26ba43ddad and 06a109192 (and maybe others).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/geodns#199
No description provided.