Scaling Redis With Containers Using Redis Enterprise
If Redis is your database of choice, then you'll be happy to know that Redis Enterprise is easy to set up and scale out using Docker containers.
Join the DZone community and get the full member experience.
Join For FreeDocker makes development much simpler and takes the nasty surprises out of deploying to production. Docker is lightweight, fast, portable and composable. Redis makes it shine.
Redis Enterprise platform supports mission critical Redis applications that require advanced availability, online and simpler scaling, improved security controls and great multi-tenancy capabilities. Redis Enterprise is completely compatible with Redis apps: Simply change your connection string and you are ready to go.
Redis is in-memory and RAM can get expensive for larger datasets. Redis Enterprise also extends Redis data placement to allow it to store data both in RAM and on Flash with optimized data placement logic and can keep latencies at near-RAM levels.
If you have an existing Redis app, it is easy to get started with Redis Enterprise. You can follow the instructions on the Docker hub or below.
Step 1: Run the Redis Enterprise Pack Container
docker run -d –cap-add sys_resource –name rp -p 8443:8443 -p 12000:12000 redislabs/redis
Step 2: Set Up Redis Enterprise Pack Cluster
Simply visit https://localhost:8443 on the host machine and follow the setup instructions.
Step 3: Create a Redis Database
Create a Redis database on port 12000 – click on Advanced Options to set the database port.
Step 4: Connect to Your Database 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”
You now have Redis Enterprise Pack running on your env. If you'd like to run a scale-minimized cluster with Redis Enterprise to see its availability and scalability features, you can simply add more nodes by running more container instances and joining them to the cluster.
Want to explore more? You can find more detailed information here.
Happy hacking!
Opinions expressed by DZone contributors are their own.
Trending
-
SRE vs. DevOps
-
Microservices Decoded: Unraveling the Benefits, Challenges, and Best Practices for APIs
-
How To Integrate Microsoft Team With Cypress Cloud
-
Top 10 Engineering KPIs Technical Leaders Should Know
Comments