olric is a free, open source databases project written in Go and released under Apache-2.0. It has 3,494 GitHub stars, 152 forks and 19 open issues, and was last pushed 29 days ago. On this registry it ranks #170 of 203 tracked projects in Databases, with 5 head-to-head comparisons available.

What is olric?

Olric is a distributed, in-memory key/value store and cache written in Go that runs either as an embedded Go library or as a language-independent standalone service, and it is aimed at teams that need a fast, scalable, shared pool of RAM across a cluster of machines.

What it is

Olric is a distributed hash table that stores transient, approximate and fast-changing data across a set of servers. It is written entirely in Go and is designed specifically for distributed environments, which means partitioning, data rebalancing, replication and failure detection are part of the store rather than something the operator has to assemble from separate components. It can be linked directly into a Go program as a library, or started as a separate process through the olric-server binary so that non-Go applications can talk to it over the network.

The concrete problem it replaces is the single-node cache or the hand-rolled Redis deployment used to hold cluster state and shared ephemeral data. It speaks the Redis Serialization Protocol (RESP), so client libraries that already exist for Redis in nearly every major programming language can be pointed at it, and it provides a drop-in replacement for the Redis Publish/Subscribe messaging system. Its stated use cases are distributed caching, managing application cluster state, and publish-subscribe messaging.

Key capabilities

  • Distributed hash table with automatic partitioning (sharding) and data rebalancing, requiring no external coordination service such as ZooKeeper or Consul.
  • New members auto-discover the cluster and linearly increase capacity; the design targets hundreds of members and thousands of clients.
  • Replication enabled by default, with both synchronous and asynchronous options, plus quorum-based voting for replica control through read and write quorums.
  • Eviction algorithms including LRU and TTL for cache-style workloads.
  • Atomic operations and an iterator over distributed maps.
  • A locking primitive inspired by the SETNX locking pattern of Redis.
  • A plugin interface for service discovery daemons, plus both programmatic and declarative configuration.

Who uses it and how

  • Applications that need a distributed cache layer in front of a slower backing store, where eviction by LRU or TTL keeps memory bounded.
  • Go services that embed Olric as a library and thereby avoid a separate network hop and a separate process to operate.
  • Polyglot environments that run Olric as a standalone service through olric-server and connect with existing Redis client libraries over RESP.
  • Clusters that need to share application state, such as session or configuration data, across many nodes without a central coordinator.
  • Systems that need publish-subscribe fan-out between services and want it served by the same store that holds their cache data.

Getting started

Import the Go module at github.com/olric-data/olric to embed Olric in an application, or run the olric-server binary as a standalone service; the README also documents a Docker path and a Samples section.

How it compares

Among the tools named in the material, Redis is the closest reference point: Olric uses the same RESP protocol, so Redis client libraries work against it, and it is presented as a drop-in replacement for Redis Publish/Subscribe. The difference is structural rather than syntactic, in that Olric is a distributed hash table with built-in partitioning, rebalancing, replication and quorum voting instead of a single-node server that needs external clustering. It is licensed under Apache-2.0 and self-hosted, so there is no hosted control plane or per-node fee involved.

When to use it — and when not to

A self-hoster runs the cluster members themselves and, for the standalone mode, the olric-server processes, which means owning capacity planning and the rebalancing behaviour that follows membership changes. Olric provides best-effort consistency guarantees and is explicitly not a complete CP solution, so it is a poor fit for data that needs strong consistency or durable storage; it is built for transient, approximate data. Note also the module rename: github.com/buraksezer/olric became github.com/olric-data/olric in v0.6.0, so older import paths should be updated, and the current production version is v0.7.0.

project readme (upstream, from github) — read inline

Olric

Go Reference Build Release Discord License

Distributed In-Memory Cache & Key/Value Store

Olric provides a simple way to create a fast, scalable, and shared pool of RAM across a cluster of machines. It's a distributed, in-memory key/value store and cache, written entirely in Go and designed specifically for distributed environments.

Flexible Deployment:

  • Embedded Go Library: Integrate Olric directly into your Go applications.
  • Standalone Service: Run Olric as a language-independent service.

Key Features:

  • Effortless Scalability: Designed to handle hundreds of members and thousands of clients. New nodes auto-discover the cluster and linearly increase capacity.
  • Automatic Distribution: Provides partitioning (sharding) and data re-balancing out-of-the-box, requiring no external coordination services. Data and backups are automatically balanced when capacity is added.
  • Wide Client Support: Uses the standard Redis Serialization Protocol (RESP), ensuring client libraries are available in nearly all major programming languages.
  • Common Use Cases: Ideal for distributed caching, managing application cluster state, and implementing publish-subscribe messaging.

See Docker and Samples sections to get started!

Join our Discord server!

The current production version is v0.7.0

About renaming the module

github.com/buraksezer/olric module has been renamed to github.com/olric-data/olric. This change has been effective since v0.6.0. Importing previous versions should redirect you to the new repository, but you should change the import paths in your codebase as soon as possible.

There is no other difference between v0.5.7 and v0.6.0.

At a glance

  • Designed to share some transient, approximate, fast-changing data between servers,
  • Uses Redis serialization protocol,
  • Implements a distributed hash table,
  • Provides a drop-in replacement for Redis Publish/Subscribe messaging system,
  • Supports both programmatic and declarative configuration,
  • Embeddable but can be used as a language-independent service with olric-server,
  • Supports different eviction algorithms (including LRU and TTL),
  • Highly available and horizontally scalable,
  • Provides best-effort consistency guarantees without being a complete CP (indeed PA/EC) solution,
  • Supports replication by default (with sync and async options),
  • Quorum-based voting for replica control (Read/Write quorums),
  • Supports atomic operations,
  • Provides an iterator on distributed maps,
  • Provides a plugin interface for service discovery daemons,
  • Provides a locking primitive which inspired by SETNX of Redis,

Possible Use Cases

Olric is an eventually consistent, unordered key/value data store. It supports various eviction mechanisms for distributed caching implementations. Olric also provides publish-subscribe messaging, data replication, failure detection and simple anti-entropy services.

It's good at distributed caching and publish/subscribe messaging.

Table of Contents

Features

  • Designed to share some transient, approximate, fast-changing data between servers,
  • Accepts arbitrary types as value,
  • Only in-memory,
  • Uses Redis protocol,
  • Compatible with existing Redis clients,
  • Embeddable but can be used as a language-independent service with olric-server,
  • GC-friendly storage engine,
  • O(1) running time for lookups,
  • Supports atomic operations,
  • Provides a lock implementation which can be used for non-critical purposes,
  • Different eviction policies: LRU, MaxIdleDuration and Time-To-Live (TTL),
  • Highly available,
  • Horizontally scalable,
  • Provides best-effort consistency guarantees without being a complete CP (indeed PA/EC) solution,
  • Distributes load fairly among cluster members with a consistent hash function,
  • Supports replication by default (with sync and async options),
  • Quorum-based voting for replica control,
  • Thread-safe by default,
  • Provides an iterator on distributed maps,
  • Provides a plugin interface for service discovery daemons and cloud providers,
  • Provides a locking primitive which inspired by SETNX of Redis,
  • Provides a drop-in replacement of Redis' Publish-Subscribe messaging feature.

See the Architecture section to see details.

Support

We have a few communication channels:

You should know that the issue tracker is only intended for bug reports and feature requests.

Software doesn't maintain itself. If you need support on complex topics or request new features, please consider sponsoring Olric.

Development

Please see our AI Contribution Policy before raising any AI-generated PR or bug reports.

Manually written code and bug reports are strongly preferred because AI-generated content is often low-quality and hard to understand and maintain.

Installing

With a correctly configured Golang environment:

go install github.com/olric-data/olric/cmd/[email protected]

Now you can start using Olric:

olric-server -c cmd/olric-server/olric-server-local.yaml

See the Configuration section to create your cluster properly.

Docker

You can laun

readme truncated — read the full docs on github

Frequently asked questions

Is olric free to use?

olric is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does olric do?

Distributed, in-memory key/value store and cache. It can be used as an embedded Go library and a language-independent service.

What is olric written in?

olric is primarily written in Go. Its source is publicly available at https://github.com/olric-data/olric, and it has 3,494 GitHub stars.