GeoIP Question - Speed & efficiency

Chris Savery chrissavery at gmail.com
Sat Aug 16 04:43:45 MSD 2008


Hello,

I am thinking of using the GeoIP module with input from the maxmind 
database converted with the perl script as described through the link on 
the nginx site.

I'm curious if the country-ip pairs are managed efficiently so that the 
lookup/conversion is very fast or not? That is, does the module do 
something like sort the list and then use a binary tree  to quickly 
locate the country? Is the whole thing loaded in memory? This country 
database is quite huge and if this process happens on every hit or even 
on only a selected entry page then it could be very slow. Does anyone 
here have experience with this?

For my purposes I only really need to detect continents for deciding if 
visitors should pull from one of a few server locations. So presumably 
it may be possible to combine many countries into larger blocks so that 
there are fewer steps in the lookup. Any input on how speedy or 
efficient this has shown to be would be super helpful here.

Thanks,
Chris :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080816/8414b2bb/attachment.html>


More information about the nginx mailing list