Such amount of redirects can be best done with 'map', if you want dynamic redirects then you need Lua, a table read from sql into memory and an optimized Lua routine which does the rewrite (so not map).
Map is static until nginx is reloaded, with Lua you can read sql data, store in ram and periodically re-read sql for a refresh.
https://groups.google.com/forum/#!forum/openresty-en
But all in all not a job to be done in 5 min...
Map is static until nginx is reloaded, with Lua you can read sql data, store in ram and periodically re-read sql for a refresh.
https://groups.google.com/forum/#!forum/openresty-en
But all in all not a job to be done in 5 min...