Because Nginx requires the geoip_ directives to go into the main http{ } block of the nginx.conf file, does that mean the geoip data is being pulled for every single request?
In other words, does NginX look up the geoip data for ALL of the requests coming in, even for those not needing the data?
Nginx parses and loads geoip data into memory once the config file only on (re)start or SIGHUP.
What about expanding $geoip_* variables - I'm not sure, but hope they calculates only when required (in "if" or "log" or "map" or whatever construction). Anyway, it doesn't reread and reload whole dat the file each request.
GeoIP lookups come from a distributed database rather than from a dynamic server, so unlike DNS, the worst-case performance hit is minimal.