5 messages in ru.sysoev.nginxRe: GeoIPCity with nginx
FromSent OnAttachments
Bobby DrNov 22, 2008 8:18 am 
Maxim DouninNov 22, 2008 1:05 pm 
Arvind JayaprakashNov 22, 2008 11:58 pm 
Igor SysoevNov 23, 2008 3:12 am 
Maxim DouninNov 23, 2008 8:37 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: GeoIPCity with nginxActions...
From:Maxim Dounin (mdou@mdounin.ru)
Date:Nov 22, 2008 1:05:25 pm
List:ru.sysoev.nginx

Hello!

On Sat, Nov 22, 2008 at 05:18:31PM +0100, Bobby Dr wrote:

Hello list!

I know Maxmind's GeoIP Country database can be used easily with nginx. But what about their Geo-City database?

The default CSV database stands at > 100MB in size (and will grow even larger if the two normalized files are merged together). For this reason, using the CIDR format may not be feasible (due to excessive memory requirement)

The binary file is much smaller however.

The problem with maxmind's city database afaik is that text information they provide aren't cidrs, but ip ranges. This is generaly good for relation databases, but worst case for those who are able to work with cidrs.

Binary file afaik is radix tree dump with real cidrs, that's why it's much smaller.

Theoretically it should be possible to collapse ip ranges to optimal set of cidr's to make this usable with native nginx geo module, but this isn't really easy task.

Has anybody been able to use the geo-city database with nginx? For apache MaxMind provides mod_geoip which works on the binary file, making it very fast.

Does anyone have any solution (like mod_geoip) for nginx? I'm using PECL geoip for PHP and the one for ruby. But I feel, geo lookup at the server level would be much faster.

Is there any official/3rd party geo-city module for nginx?

AFAIK, no.