-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lookup Alternative - TXT Map-File #2
Comments
Good idea 👍 |
We should compare the memory consumption though. |
Please reach out if you have any questions about IPinfo. I mentioned in @iwikus's blog that the size of the database will be smaller because the issue of smaller ranges resulting in a bigger file size is a known issue for us. However, it will not be significantly smaller compared to other databases. I believe an MMDB-based solution is the optimal choice because it is both fast and compact. However, I am not very familiar with the project so I am not sure which option would be the best fit. |
From what I see from a first view:
As described in haproxy/haproxy#223 they will use loads of RAM. As for the performance - I will try to find some time for benchmarks. Not sure how performant it is with (global-) large-scale DBs. Regarding the pure-LUA implementation - this would be nice to have. But I have not found time to test it, as https://github.com/anjia0532/lua-resty-maxminddb seems to have some nginx-specific (resty) code in it. Changes to the script might be needed. |
I still did not get into testing that lua code... |
Hi, I was searching if there is any lua geoip plugin for HAproxy and found this your project. I see you have implemented it by doing lookups to location service or (untested) lua mmdb library. For the the first option, this is possible do it other and I think more easy way, since there you need to do that caching for performance reasons.
Using geoip database or ipinfo it is posible to generate geoip.txt with all ip ranges and countries - I am doing it here (big file) http://iwik.org/ipcountry/geoip.txt
Just yesterday have switched source of data and details are here on my blog https://blog.erben.sk/2024/09/14/new-country-ip-ranges-generator/ including link to source.
And you can use it for ACL like this
Or in frontend part, set variable
http-response set-header geoip-countrycode %[src,map_ip(/etc/haproxy/geoip.txt)]
Or just in custom logformat (end of this huge line)
Anyway, when I find some time, I will try doing some test with that lua mmdb library.
The text was updated successfully, but these errors were encountered: