Skip to content

Multi-master KeyDB (redis-compatible) replication with automatic discovery in Docker Swarm

License

Notifications You must be signed in to change notification settings

coryaent/krause

Repository files navigation

Krause

Docker image size CodeFactor Grade

Krause allows one to easily setup an eventually consistent, highly available, Redis-compatible datastore. It is suitable as a cache or message broker.

Overview

KeyDB is a fork of Redis which strives to maintain 100% compatibility with the Redis wire protocol. Krause is a wrapper which assists with running KeyDB on multiple nodes within Docker Swarm by adding automatic discovery to KeyDB.

Krause enables automatic discovery by querying Swarm's DNS server for a lookup of tasks.<service-name>.

Example

docker network create --opt encrypted --driver overlay --attachable keydb
version: '3.8'

services:
  master: 
    image: coryaent/krause
    environment:
      - SERVICE_NAME={{.Service.Name}}  
    networks:
      - keydb
    deploy:
      replicas: 6
      placement:
        max_replicas_per_node: 1

networks:
  keydb:
    external: true