Giter Club home page Giter Club logo

geoip_server's Introduction

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/

geoip_server's People

Contributors

jrconlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

geoip_server's Issues

load testing

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 ?

reviews

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 ?

  • what socket.makefile() is used for ?

Code doesn't seem to support IPv6 address lookups

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.