olric
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?
Distributed, in-memory key/value store and cache. It can be used as an embedded Go library and a language-independent service.
Overview of olric
What it is
Olric is a distributed, in-memory key/value store and cache written in Go. It can be used as an embedded Go library or as a language-independent standalone service. It uses the Redis Serialization Protocol (RESP) for client communication.
Key features
- Distributed hash table with automatic partitioning (sharding) and data re-balancing without external coordination.
- Supports multiple eviction policies: LRU, Time-To-Live (TTL), and MaxIdleDuration.
- Replication with synchronous and asynchronous options, and quorum-based voting for replica control.
- Atomic operations (INCR, DECR, CAS, GETPUT, INCRBYFLOAT) and a locking primitive inspired by Redis SETNX.
- Provides a drop-in replacement for Redis Publish/Subscribe messaging.
- Thread-safe by default, with O(1) lookup time and a GC-friendly storage engine.
- Plugin interface for service discovery (static list, Consul, Kubernetes, cloud providers).
Use cases
Olric is designed for distributed caching, managing transient and fast-changing data across servers, and publish/subscribe messaging. It can also be used to share application cluster state.
Getting started
Install olric-server: go install github.com/olric-data/olric/cmd/[email protected] Run a single-node cluster with the sample configuration: olric-server -c cmd/olric-server/olric-server-local.yaml Or use Docker: docker pull ghcr.io/olric-data/olric:latest Then interact with any Redis client (e.g., redis-cli on port 3320): redis-cli -p 3320 127.0.0.1:3320> DM.PUT my-dmap my-key 'Olric Rocks!' OK 127.0.0.1:3320> DM.GET my-dmap my-key 'Olric Rocks!'
License and pricing
Olric is open source under the Apache License 2.0. There is no stated pricing; it is free to use.
Based on the project's public README and repository metadata.