Sign inSign up

redislabs/redis

Verified Publisher

By Redis

•Updated 1 day ago

Clustered in-memory database engine compatible with open source Redis by Redis Labs

Image
Security
Databases & storage
Monitoring & observability
46

100M+

redislabs/redis repository overview

⁠Supported Tags
  • 8.2.0-78,
  • 8.0.2-41,
  • 7.22.2-41,
  • 7.22.0-241,
  • 7.8.6-13,
  • 7.8.4-95,
  • 7.8.2-60,
  • 7.4.6-275,
  • 7.2.4-122,
  • 6.4.2-121,
  • 6.4.2-61,
  • 6.2.18-71,
  • 6.2.12-82,
  • 6.2.12-68,
  • 6.2.10-129,
  • 6.2.8-64,
  • 6.2.4-54,
  • 6.0.20-97,
  • 6.0.20-95,
  • 6.0.20-69,
  • 6.0.12-58,
  • 6.0.8-30,
  • 6.0.6-39,
  • 5.6.0-31,
  • 5.4.14-34,
  • 5.4.10-22,
  • 5.4.6-17,
  • 5.4.4-7,
  • 5.4.2-27,
  • 5.4.0-19,
  • 5.2.2-24,
  • 5.2.0-14,
  • 5.0.2-30,
  • 5.0.0-31,
  • 4.5.0-51
⁠Preview Versions

Build Status

⁠What is Redis Enterprise Software (RS)?

Redis Enterprise Software⁠ is enterprise grade, distributed, in-memory NoSQL database server, fully compatible with open source Redis by Redis Labs. Redis Enterprise Software extends open source Redis and delivers stable high performance, zero-downtime linear scaling and high availability, with significant operational savings.

RS Architecture

  • Redis Enterprise Software can use both RAM and Flash drives such as SSDs for data processing. See Redis on Flash⁠) for details.
  • Redis Enterprise Software can also support active-active geo-distributed applications with Redis CRDTs⁠
  • Redis Enterprise Software supports Redis Modules. See details at RediSearch⁠, ReJSON⁠ and ReBloom⁠

⁠Quick Start

  1. Run the Redis Enterprise container
docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 9443:9443 -p 12000:12000 redislabs/redis
  1. Configure Redis Enterprise cluster using the "rladmin" tool and "create cluster" command
docker exec -d --privileged rp "/opt/redislabs/bin/rladmin" cluster create name cluster.local username [email protected] password redislabs123
  1. Create a database on Redis Enterprise cluster
curl -k -u "[email protected]:redislabs123" --request POST --url "https://localhost:9443/v1/bdbs" --header 'content-type: application/json' --data '{"name":"db1","type":"redis","memory_size":102400,"port":12000}'

Note: Redis Enterprise may take a few seconds to start depending on your HW. if you receive the following message: "503 Service Unavailable", wait a few more seconds and repeat step-2 and step3 again.

  1. Connect to Redis database in Redis Enterprise cluster using "redis-cli"
docker  exec -it rp bash

# sudo /opt/redislabs/bin/redis-cli -p 12000
# 127.0.0.1:16653> set key1 123
# OK
# 127.0.0.1:16653> get key1
# "123"
#

⁠Step-by-Step Guide

You can run the Redis Enterprise Software linux based container on MacOS, various Linux and Windows based machines with Docker. Each Redis Enterprise Software container runs a cluster node. To get started, you can simply set up a one node cluster, create a database and connect your application to the database.

Note: Redis Enterprise Software Docker image works best when you provide a minimum of 2 cores and 6GB ram per container. You can find additional minimum hardware and software requirements for Redis Enterprise Software in the product documentation⁠

  1. Run Redis Enterprise Software container

Port 8443 is used for the administration UI and port 12000 is reserved for the Redis database that will be created in Step #5 below.

docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 12000:12000 redislabs/redis

  1. Setup Redis Enterprise Software by visiting https://localhost:8443 on the host machine to see the RS Web Console

Note: You may see a certificate error with your browser. Simply choose "continue to the website" to get to the setup screen.

setup screen

  1. Go with default settings and provide a cluster FQDN: "cluster.local"

setup screen

  1. Configure free trial & set up cluster admin account

If you don't have a license key, click "Next" to skip the license key screen to try the free version of the product. On the next screen, set up a cluster admin email and password.

setup screen

  1. Choose the new redis db option

In the new redis db screen, click the "show advanced option" link and provide a database name "database1", endpoint port number of "12000" and click "Activate" to create your database.

setup screen

You now have a Redis database!

⁠Connecting to the Redis Database

With the Redis database created, you are ready to connect to your database to store data. You can use redis-cli or your favorite language with Redis client driver to talk to the new database. There is a python based example below.

  • Connect using redis-cli:

redis-cli is a simple commandline tool to interact with a Redis instance. Use the following script to connect to the Redis Enterprise Software container, run redis-cli connecting to port 12000 and store and retrieve a key.

docker  exec -it rp bash

# sudo /opt/redislabs/bin/redis-cli -p 12000
# 127.0.0.1:16653> set key1 123
# OK
# 127.0.0.1:16653> get key1
# "123"
#
  • Connect using a Simple Python App:

If you don't have python or redis-py (python library for connecting to Redis) on the host, you can run the redis-py container⁠.

Following section assumes you already have python and redis-py configured on the host machine running the container.

You can find the instructions to install redis-py on the github page for redis-py⁠.

Paste the following into a file named "redis_test.py"

import redis

r = redis.StrictRedis(host='localhost', port=12000, db=0)
print ("set key1 123")
print (r.set('key1', '123'))
print ("get key1")
print(r.get('key1'))

Run redis_test.py application to connect to the database and store and retrieve a key.

python redis_test.py

The output should look like the following screen if the connection is successful.

# set key1 123
# True
# get key1
# b'123'

⁠Quick Reference

Supported Docker Versions:

Docker version 17.x or greater.

Getting Started

Detailed Documentation

Tag summary

Content type

Image

Digest

sha256:807590042…

Size

653.7 MB

Last updated

23 days ago

docker pull redislabs/redis

This week's pulls

Pulls:

12,323

Last week