0

I'm trying to implement cuckoo filter in Redis. What I have till now works fine except that it just inserts all the values on a single node even when working on a cluster.

In order to implement it on multiple nodes, I'm thinking of directing different elements to different nodes using some hash function. Is there any command or function call in Redis that allows forcing of elements to a particular node using its key or number, or even a particular slot?

For reference, this is the implementation of cuckoo filter I have till now.

As an aside, is there any existing implementation of Cuckoo Filter or Bloom Filter on distributed nodes in Redis that I can refer to?

mohitmayank
  • 631
  • 2
  • 7
  • 20
  • 1
    You can only force given keys to hash to the same node, that's possible via `hash tags`. For example the two keys `foo{zap}` and `bar{zap}` will hash to the same hash slot since the string inside `{}` is the same. – antirez Nov 05 '16 at 16:45

1 Answers1

1

This page explains how Redis cluster works and how the redis-cli works when using it in cluster mode. Other clients do a better handling of the operations in cluster mode, but the basic functionality of the redis-cli should work for simple tests.

If you check the code of other data structures (for example, hash or set) that come with Redis, you'll notice that they do not have code to deal with cluster mode. This is handled by the code in cluster.c, and should be orthogonal to your implementation. Are you sure you have correctly configured the cluster and the Redis cli?

cabad
  • 4,555
  • 1
  • 20
  • 33