RE: mod_geoip
Spill Group <lists <at> spillgroup.com>
2006-11-06 09:21:51 GMT
Robert Locke wrote:
> Is anyone out there using "mod_geoip" in production? Does it
> add a significant overhead to each request? Is it best to
> store the GEO_IP database in memory?
Hi Robert,
We're using it production for a few weeks now. We haven't noticed
significant performance issues. We load the database in memory (the
country db is small), and are using an experimental patch on the
redirect module which is able to replace the environment variables set
by mod_geoip. Our config looks like this:
# country preference through cookie
$HTTP["cookie"] =~ "country=([^;]*)" {
url.redirect = ( "^(/)?$" => "http://%1.mydomain.com/" )
}
# country detection through mod_geoip
else $HTTP["cookie"] =~ ".*" {
geoip.default_country_code = "global"
geoip.force_lowercase = "enable"
url.redirect = ( "^(/)?$" =>
"http://#GEOIP_COUNTRY_CODE#.mydomain.com/" )
}
The 'default_country_code' and 'force_lowercase' options to mod_geoip
are custom, as well as the patch to mod_redirect. We'd like to give
these changes back to the community if anyone's interested, but we want
to make sure the code is stable before releasing it.
> Also, on a related note, is there a best approach to take in
> "internationalizing" a site for various languages, in terms
> of server, directory, code structure, etc?
As for the url, eventually we decided to go for
'COUNTRY.mydomain.com/LANGUAGE/'. We placed mod_geoip at
WWW.mydomain.com to redirect visitors to the correct country site.
Additionally some javascript is used for the language detection. This is
all static content however, so it may not apply to a fully dynamic site.
Regards,
--
Matthijs van der Klip
Technical Infrastructure Manager
Spill Group
Arendstraat 23
1223RE Hilversum
The Netherlands
T: +31 (0)35 647 82 48
F: +31 (0)35 647 82 49
W: http://www.spillgroup.com
E: matthijs <at> spillgroup.com
Confidentiality: This e-mail and its attachments are intended for the
above named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or show
them to anyone; please reply to this e-mail and highlight the error.
Security Warning: Please note that this e-mail has been created in the
knowledge that Internet e-mail is not a 100% secure communications
medium. We advise that you understand and observe this lack of security
when e-mailing us.
Viruses: Although we have taken steps to ensure that this e-mail and
attachments are free from any virus, we advise that in keeping with
good computing practice the recipient should ensure they are actually
virus free.