Riak pluggable backend

Riak supports pluggable backend which means we can choose the different storage back end according to our needs. We have the below storage backends

  • BitCask
  • LevelDB
  • Memory
  • Multi

Bitcask is an Erlang application that provides an API for storing and retrieving key/value data using log-structured hash tables that provide very fast access.

By default Riak uses this storage back end. The major weakness in this storage back end is key storage behavior. It maintains all the keys in memory all the time which means that the riak node must have enough memory to contain your entire keyspace, plus additional space for other operational components and operating- system-resident filesystem buffer space


eLevelDB is an Erlang application that encapsulates LevelDB, an open-source, on-disk key/value store created by Google Fellows Jeffrey Dean and Sanjay Ghemawat.

LevelDB is a relatively new entrant into the growing list of key/value database libraries, but it has some very interesting qualities that we believe make it an ideal candidate for use in Riak. LevelDB’s storage architecture is more like BigTable’s memtable/sstable model than it is like Bitcask. This design and implementation provide the possibility of a storage engine without Bitcask’s RAM limitation

Reading is slow when the levels are more which is the major weakness when using this storage

All data is stored in memory tables and the data will never be persisted into the disk or any other storage. It uses Erlang Ets tables to manage data

Riak allows us to run multiple backends within a single Riak cluster. We can store each bucket into a different memory storage. Any combination of the three available backends—Bitcask, LevelDB, and Memory—can be used.

We can create a different bucket type and specify the backend and finally create a bucket and assign the appropriate bucket type. In this way we can leverage the multiple backend option


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s