Skip to content

Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree.


Notifications You must be signed in to change notification settings


Repository files navigation


What is LotusDB

LotusDB is the most advanced key-value store written in Go, extremely fast, compatible with LSM tree and B+ tree, and optimization of badger and bbolt.

Key features:

  • Combine the advantages of LSM and B+ tree
  • Fast read/write performance
  • Much lower read and space amplification than typical LSM

Design Overview

Getting Started

package main

import (

func main() {
	// specify the options
	options := lotusdb.DefaultOptions
	options.DirPath = "/tmp/lotusdb_basic"

	// open a database
	db, err := lotusdb.Open(options)
	if err != nil {
	defer func() {
		_ = db.Close()

	// put a key
	err = db.Put([]byte("name"), []byte("lotusdb"), nil)
	if err != nil {

	// get a key
	val, err := db.Get([]byte("name"))
	if err != nil {

	// delete a key
	err = db.Delete([]byte("name"), nil)
	if err != nil {

see the examples for more details.


Welcome to join the Slack channel and Discussions to connect with LotusDB team members and other users.

If you are a Chinese user, you are also welcome to join our WeChat group, scan the QR code and you will be invited: