Hello!
On Thu, May 22, 2014 at 4:34 AM, Gordon Madarm wrote:
> Alternatively, is there a "openresty" way to query a GeoIP database for a
> given parameter value or will using lua-geoip be sufficient?
>
Yes, you're free to use Lua binding for the geoip library for maximum
flexibility. Better use a binding based on LuaJIT FFI such that the
surrounding Lua code can be JIT compiled by LuaJIT. Another thing to
note is to cache the loaded database and you can also share it by
initializing it in init_by_lua and let the operating system's
Copy-On-Write (COW) feature take care of the rest among all the nginx
worker processes.
Regards,
-agentzh