This talk goes over several options for mapping IP address to country (client side, server side, etc.) that I have used in a large scale, production in a web application.
session based of X_FORWARDED_FOR ! If there is no country in session, then query IPinfoDB once. Put very strict timeouts and no retries on this. ! If the query fails then don’t show country specific info. ! @jewelia
via apt-get or aptitude). ! Updated nightly! ! $geoip_country_code — two-letter country code, for example, "RU", "US". ! ! Nginx caches all supplied databases in memory. The country database is small, roughly 1.4M @jewelia