Aerospike

Aerospike is a distributed key-value DBMS. It is mainly targeted at OLTP workloads with a large number of very large transactional workloads. It is developed by a company of the same name.

History

Aerospike, originally known as Citrusleaf, was released in 2010 by a company of the same name. In 2012, the company rebranded to Aerospike, renaming the database at the same time. In 2014, the database was open-sourced.

Data Model

Key/Value

Aerospike uses a key-value data model. Keys are mapped on to records. Each record is comprised of its key, its bins, and its metadata. Bins are analogous to fields in a relational database. Records are organized into sets. Sets can be configured to have storage policies. Policies dictate whether records are stored on disk or in-memory and replication factors among other parameters. Sets are organized into namespaces.

Foreign Keys

Not Supported

Aerospike does not support foreign keys but instead allows users to embed sub-records within records.

Indexes

Red-Black Tree

Aerospike implements indexes differently for primary and secondary keys. Primary indexes are implemented as an in-memory mix of red-black trees and traditional hash-indexes. Consistent hashing allows records to be located to a particular node. Within a single node, records are indexed by red-black trees that it calls sprigs. Secondary indexes are built using in-memory b-trees.

Isolation Levels

Serializable

Aerospike supports multiple isolation levels: strong consistency, serializability (which it calls linearizability), and session consistency. In strong consistency, the database ensures that all writes occur in a specific order across all nodes. Strong consistency is only supported on a single record level. Under linearizable consistency, reads and writes appear to be atomic system-wide. However, the additional synchronization costs associated with this can impact performance.

Query Interface

Custom API

Aerospike uses a custom api that is quite similar to SQL. It supports most statements in the SQL standard.

Storage Architecture

Disk-oriented

Storage Model

N-ary Storage Model (Row/Record)

Aerospike uses a hierarchical storage model. The highest level of the storage hierarchy is called a namespace. Namespaces exist both above and below the database level of a traditional relational database. A namespace can exist across multiple databases and multiple namespaces can be contained within a single database. Configuration of data storage is done at the namespace level, including the configuration of where data is stored (Memory or Disk) and replication factor. These controls are done through namespace level policies which can be user-defined. Below namespaces lie sets that are akin to tables in a relational database which are comprised of a number of records. Policies can be defined for sets to override the policy of their namespace. Records are all stored contiguously in memory or on disk.

Storage Organization

Copy-on-Write / Shadow Paging

Aerospike uses copy on write storage organization to increase the number of records that can be fit in memory. Because storage policies are configurable at the namespace level, different namespaces can be stored on different storage mediums (memory, flash, disk, etc.).

Stored Procedures

Supported

Aerospike supports what it calls User-Defined Functions (UDFs) which are limited versions of stored procedures. UDFs are able to be invoked on single records when called from a client or can be invoked on a stream of records. User-Defined Functions can be written in Lua which will have access to APIs for whether the UDF is to be invoked on a single record or on a stream of records. UDFs can be deployed and called on a single node.

System Architecture

Shared-Nothing

Aerospike uses a consistent hashing method to distribute the storage of data across nodes. Distribution is done at a namespace level (see storage model) with records within sets being distributed across nodes. Records are replicated across nodes using the same consistent hashing method and are not replicated on the same node as their original storage location.

People Also Viewed

Aerospike Logo
Website

http://www.aerospike.com/

Source Code

https://github.com/aerospike/aerospike-server

Tech Docs

https://www.aerospike.com/docs/

Former Name

Cirtusleaf

Developer

Aerospike, Inc.

Country of Origin

US

Start Year

2009

Project Type

Commercial, Open Source

Written in

C

Supported languages

C, C#, C++, Go, PHP, Python, Ruby, Rust

Operating Systems

Linux

Licenses

AGPL v3

Wikipedia

https://en.wikipedia.org/wiki/Aerospike_database

People Also Viewed