Bloom filter UDF module for aerospike DB
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Aerospike Bloom filter UDF module

MIT license

Storage based on probabilistic structure Bloom filter

Suitable for storing huge amount of data and quering if element is present or not


You probably should use which uses Aerospike bytes directly

This module is based on: but it uses specific serialization methods (

This module uses Aerospike's bytes.get_string() which causes memory leaks (


  • Compile lua_bloom_filter (described in the project)
  • Upload so module to Aerospike echo "REGISTER MODULE '/path_to_repo/lua_bloom_filter/release/'" | aql
  • Upload UDF to Aerospike echo "REGISTER MODULE '/path_to_repo/bloom.lua'" | aql


Use Aerospike apply

Module: bloom

Method: add

Example in python:

as_client.apply(key, "bloom", "add", ["bin", value])) #returns 0 if not found, 1 if found

Default size is 10000 elements with precision 0.01, which are defined on first lines of the code. I did not want to pass them as parameter with every request, if you have better idea how to solve that fell free to open issue or PR.


Feel free to contribute.

Copyright and License

© 2016 Vít Listík

Released under MIT licence