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:atricia 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:atricia
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.
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:atricia 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:atricia
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.