Sign inSign up

eqalpha/keydb-pro

By eqalpha

Updated almost 6 years ago

KeyDB Professional Docker Image

Image
1

2.8K

eqalpha/keydb-pro repository overview

Current Release Build Status Join the chat at https://gitter.im/KeyDB/community StackShare

image

Quick Reference

Welcome to KeyDB Professional!

This docker image is similar to the community docker image, however images here contain only KeyDB Pro binaries and images are set up to run KeyDB Pro on boot. For Pro users this image is recommended for use. This image is smaller in size as it is exclusive to Pro and will always contain everything Pro exclusive moving forwards.

What is KeyDB?

KeyDB is a high performance fork of Redis with a focus on multithreading, memory efficiency, and high throughput. In addition to multithreading, KeyDB also has popular features such as Active Replication, Multi-Master support (experimental), and backup to AWS S3. KeyDB also enables you to EXPIRE members of a set with Subkey Expires and cleans up expired keys in real time.

KeyDB maintains full compatibility with the Redis protocol, modules, and scripts. This includes the atomicity gurantees for scripts and transactions. Because KeyDB keeps in sync with Redis development KeyDB is a superset of Redis functionality, making KeyDB a drop in replacement for existing Redis deployments.

On the same hardware, one KeyDB node can perform 5X as many queries per second as a single node of Redis, with 5X lower latency. Active-Replication simplifies hot-spare failover allowing you to easily distribute writes over replicas and use simple TCP based load balancing/failover. KeyDB's higher performance enables less sharding and more functionality. With the introduction of KeyDB Pro, you start getting the functionality expected in a traditional database without compromising on performance.

<img src=https://keydb.dev/assets/img/blog/5x_opspersecVSdatasize.PNG width=420 height=300/>

Whats New?

KeyDB Professional is now avaiable! If you are using KeyDB on Docker our images now include KeyDB Pro binaries in addition to open source KeyDB. KeyDB Pro costs less than your cell phone bill and does not require a license key to try it (120min recurring demo time)!

KeyDB Pro has a new Enhanced FLASH Storage which is built on RocksDB. This new FLASH feature offers substantially higher performance than was possible with our previous FLASH implementation and does not require special filesystems. In addition FLASH offers persistent storage without requiring periodic RDB backups.

KeyDB Pro also supports MultiVersion Concurrency Control (MVCC) and enables great options such as forkless background saving and non-blocking queries.

How to use this image

If you need a brushup on any of the docker commands you can check out dockers documentation here

start a KeyDB instance

docker run --name some-keydb -d eqalpha/keydb-pro

You can also run simply with docker run eqalpha/keydb-pro. The above command simply specifies a name to the container and that it is 'detached' or runs in the background.

pass configuration parameters to KeyDB on boot:

docker run -name some-keydb -d eqalpha/keydb-pro keydb-pro-server --server-threads 4 --requirepass password 

make sure you specify the program you are running (keydb-pro-server) for which to modify the parameters for. Next specify the config parameter you would like to modify when starting the container with --parameter-name value. You can see the full set of configuration options here

if you would like to use your own config file

$ docker run -v /path-to-config-file/keydb.conf:/etc/keydb/keydb.conf --name mykeydb -d eqalpha/keydb-pro

If you are using your own config file remember to comment out "bind 127.0.0.1", change "protected-mode" from yes to no.

you can grab a copy of the default config file off our github page and modify as you see fit.

As requested by users for Redis compatability, we have included symbolic links for both redis-cli and redis.conf so they are linked to keydb-cli and keydb.conf respectively.

using KeyDB Pro with docker

docker run --name some-keydb -d eqalpha/keydb-pro keydb-pro-server  --enable-pro [license-key]

simply specify you would like to run pro with --enable-pro. If you have a license key specify it as a value to this paramter. If no value is specified you will be operating in demo mode. This enables you to try KeyDB Pro, however without a license key the process will be killed after 120 minutes. Once you have purchased a license key, put it in place of [license-key] and pro is now enabled.

Alternatively include this in your own config file as enable-pro [license-key]

using Enhanced FLASH Storage

sudo docker run -d -it --mount type=bind,dst=/flash,src=/path/to/flash/ eqalpha/keydb-pro keydb-pro-server --enable-pro [license-key] --storage-provider flash /flash 

Note per above, you do not have to specify a maxmemory or eviction policy, however if you do not it defualts to maxmemory of 1/2 RAM and eviction policy allkeys-lru. See below for additional parameters.

sudo docker run -d -it --name mycontainername --mount type=bind,dst=/flash,src=/path/to/flash/ eqalpha/keydb-pro keydb-pro-server --enable-pro [license-key] --storage-provider flash /flash --maxmemory [maxmemory-amount-ie. 500M] --eviction-policy [eviction-policy ie. allkeys-lfu]

You need to mount your flash storage volume (ssd/flash) to the docker container so it has a place to write its data. src=/path/to/flash references the location you have set up. Specify -it' to enable the container to communicate with it. The docker container already has a directory inside it named /flashwhich we will use internally as a reference.--storage-provider is used to specify the storage type and location. For this docker container it will always be --storage-provider flash /flash.

To see more about using FLASH check out docs

The FLASH storage provider is always persistent. There is no requirement to save or load RDB files if FLASH is used. You may disable periodic RDB saving by adding: save "" to your configuration file. On boot KeyDB will load any existing data in your FLASH database.

start with persistent storage

$ docker run --name some-keydb -d eqalpha/keydb-pro keydb-pro-server --appendonly yes

This enables data to be saved every second. Read up more about AOF configuration optionshere to modify persistence options further. If persistence is enabled, data is stored in the VOLUME /data, which can be used with --volumes-from some-volume-container or -v /docker/host/dir:/data (seedocs.docker volumes).

connect to it from an application

$ docker run --name some-app --link some-keydb:eqalpha/keydb-pro -d application-that-uses-keydb

or connect via keydb-cli (also compantible with redis-cli)

you can grab the ip of the container with docker inspect --format '{{ .NetworkSettings.IPAddress }}' mycontainername then run the following:

docker run -it --rm eqalpha/keydb-pro keydb-cli -h <ipaddress-from-above> -p 6379

alternatively you can link to it

$ docker run -it --link some-keydb:eqalpha/keydb-pro --rm eqalpha/keydb-pro keydb-cli -h keydb -p 6379

keydb specific options

With new features comes new options:

server-threads N
server-thread-affinity [true/false]
scratch-file-path /tmp/
active-replica yes
enable-pro [license-key]
storage-provider flash /path/to/storage/volumes/

follow us

For regular updates of changes and issue resolutions pushed to the github unstable branch, <a href=https://github.com/JohnSully/KeyDB/>please watch/follow us on github. For more general updates or to keep in touch please <a href=https://eqalpha.us20.list-manage.com/subscribe/post?u=978f486c2f95589b24591a9cc&id=4ab9220500 />subscribe to KeyDB

Tag summary

Content type

Image

Digest

Size

67.1 MB

Last updated

almost 6 years ago

docker pull eqalpha/keydb-pro