Memcache'ing of ip prefixes

Discussion in 'Perl Misc' started by Fangorn, Jun 27, 2007.

  1. Fangorn

    Fangorn Guest

    Hi,

    My situation is as
    follows:

    I have a list of ip prefixes with assigned AS numbers. I
    aggregated
    them, so there are ~120000 of them (prefixes, not as numbers :) ).
    I
    need to look them up real quick, so I use Net::patricia and it does
    the
    job well,
    but...

    I have multiple processes using the data, and multiple
    machines
    running the same processes. As the data takes ~20MB in memory, it's
    a
    little inconvinient to multiply it more than 100
    times.

    So I thought: MEMCACHE. Or something like this. But it seems
    that
    memcache is actually suitable for simple key-value assignments, and
    I
    have no idea how I could use it to store my Net::patricia
    object.

    So - my questions
    are:

    1. Is there a way to store what I already have in memcache and share
    it
    among
    processes?

    2. If not - what would be a good way to store ip prefixes, where
    good
    means: speed efficient (less than one second lookup times!) and
    easily
    cachable, preferably in memcache, but a 'host only' cache would
    be
    acceptable.

    Let's assume an sql-database is not an option here. Nor is rbldnsd
    and
    dns txt queries.

    --
    Best regards,
    Daniel
    Fangorn, Jun 27, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mayur
    Replies:
    2
    Views:
    1,012
    Natty Gur
    Jul 2, 2004
  2. =?Utf-8?B?Q29ybmUgUmFiZQ==?=

    Webservices SOAP and Namespace prefixes

    =?Utf-8?B?Q29ybmUgUmFiZQ==?=, Oct 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,869
    =?Utf-8?B?Q29ybmUgUmFiZQ==?=
    Oct 26, 2004
  3. S ML
    Replies:
    0
    Views:
    422
  4. Replies:
    4
    Views:
    715
    Martin Honnen
    Oct 5, 2005
  5. Dal
    Replies:
    4
    Views:
    916
Loading...

Share This Page