I did something similar with nginx, the data file from 51degrees and some lua code; each instance only handles 10-20k requests/sec so no clever optimization was needed.
Would you mind posting the Lua code?
I've made a gist[0]; feel free to get in touch via GH if you'd like to discuss it further.
[0] - https://gist.github.com/marklr/ae0c2f1eb61855d13cde6cef6bf63...