Memcache'ing of ip prefixes

F

Fangorn

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top