Redis
Introduction
Redis is an exceptionally fast remote in-memory database solution. The key-value data model enables Redis to handle large datasets while maintaining high availability and read-write speeds.
NoSQL databases, like Redis, are meant to run efficiently in distributed clusters that scale out horizontally. Using Docker to deploy Redis in a container makes horizontal scaling a routine, straightforward process.
Start a Docker Redis Container
Install Docker in your Ubuntu distribution.
Check the current status of the Docker service by entering the following command in your terminal, and check that the output confirms that Docker is running and active
Retrieve and start a Redis container (m7-redis) with the docker run command:
The command did not specify a Redis version. The system proceeds to download the latest available version of Redis by default.
Once the installation process is complete, check the status of current docker containers with the docker ps command:
Among other information, the system provides:
- The unique container ID -
<id> - Access Port -
6379(default Redis port number) - The defined container name -
m7-redis
Connect to Redis with redis-cli
Start the interactive redis-cli command shell using the following command:
You're reading a preview.
Sign in to read the full article. Any account opens 10 free articles a month; students and teachers read their course pages without limit.
Sign in