jrconlin / geoip_server Goto Github PK
View Code? Open in Web Editor NEWMozilla: A Stand-alone server for the MaxMind GeoIP lookup data
License: Other
Mozilla: A Stand-alone server for the MaxMind GeoIP lookup data
License: Other
Stand Alone GeoIP reader. ==== Why? ___ We're using this on a bunch of production servers. That means that the associated data file will be updated, but may have some random corruption that could cause a segfault, which would kill the server. Since we'd rather not have that happen, we're putting this into it's own service to protect from any (albeit remote) corruption crashes. Reliablity means being paranoid. What's the difference between this and django_geoip? ___ As little as possible. Data: ____ Fetch the GeoIP databases from MaxMind: http://www.maxmind.com/app/geolite System Requirements: ____ You'll need to install the following system libraries using your preferred local package manager: (e.g. for Debian, use apt-get) libevent-dev libgeoip-dev Installing: ____ $make build Running: ____ To run as a stand-alone server: $make run_sa You can execute on calls to http://_host_:5039/_IP Address_ e.g. http://127.0.0.1:5039/63.245.217.20 To run as a Powerhose Client: $make run_ph This will require a powerhose client. See geoip/example_client.py for an example of how to use this. For more info about powerhose see: http://powerhose.readthedocs.org/en/0.6/
We could use Funkload to load test a geopip server - I can do the funkload/marteau part if that helps.
What would be a good scenario to hammer geoip ?
Running a first load test, I've noticed a 10% RPS increase if we remove this line:
https://github.com/jrconlin/geoip_server/blob/master/geoip/geoip.py#L58
This is just a review I did on the code - feel free to ignore them :)
https://github.com/jrconlin/geoip_server/blob/master/geoip/geoip.py#L70 : I think some if this could be initialized only once - not on each request
https://github.com/jrconlin/geoip_server/blob/master/geoip/geoip.py#L71 : since you are starting a timer here and you are using an async server, what happens when several timers are started in parallel ? shouldn't it be a unique name or something ?
Might be a useful thing to allow as it provides better accuracy and more frequent updates.
The code has a regex that specifically matches IPv4, and I am not sure if it will fall back to the by name method or if the by name method will work on an IPv6 address.
The Maxmind db does support IPv6 address lookups.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.