Recommendation for Key/Value storage

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • badger

    Fast key-value DB in Go.

  • BoltDB and Badger are the most popular options. If you don't want to use a third-party package you'll have to reinvent it. Still, you can use one of these two as examples. You'll also find plenty of tutorials online, like this one.

  • pogreb

    Embedded key-value store for read-heavy workloads written in Go

  • I will agree with built in maps, badger, and bbolt as previously mentioned. Some unique cases require that you do many read. Take a look at the design of https://github.com/akrylysov/pogreb.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • bolthold

    BoltHold is an embeddable NoSQL store for Go types built on BoltDB

  • There's a great wrapper library around bolt (and badger, by the same guy): https://github.com/timshannon/bolthold

  • Redis

    Redis Go client

  • pebble

    RocksDB/LevelDB inspired key-value database in Go

  • BigCache

    Efficient cache for gigabytes of data written in Go.

  • There are also different packages used as a wrapper on top of the Go map based on what your requirements are (storing a lot of data) https://github.com/allegro/bigcache or (need performance) https://github.com/dgraph-io/ristretto. For basic use-cases, the standard Go map should be enough. Just keep in mind whether you need concurrent access to your data structure, in which case you should guard your map with a mutex .

  • ristretto

    A high performance memory-bound Go cache

  • There are also different packages used as a wrapper on top of the Go map based on what your requirements are (storing a lot of data) https://github.com/allegro/bigcache or (need performance) https://github.com/dgraph-io/ristretto. For basic use-cases, the standard Go map should be enough. Just keep in mind whether you need concurrent access to your data structure, in which case you should guard your map with a mutex .

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts