Add a Redis instance
Java Serialized Objects
Use Smaller Keys
Switch to 32 Bits
Upgrade Redis Version
Use Better Serializer
Combine Smaller Strings to Hashes
Switch from Set to Intset for Numeric IDs
Switch to Bloom Filter or HyperLogLog
Shard Big Hash to Small Hash
Convert Hashtable to Ziplist for Hashes
Convert to a List instead of Hash
Compress Field Names
Enable Compression for List
Avoid Dynamic Lua Script
Reclaim Expired Keys Memory Faster
Install RDBTools on AWS EC2
In this guide, we will install RDBTools on an AWS EC2 instance. You will need access to the AWS Console, and must have the ability to launch EC2 instances. At the end of this guide, you will be able to manage ElastiCache Redis instances using RDBTools.
As an alternative, you can also use our 1-click cloudformation launch wizard to automatically perform these steps for you.
Step 1: Create a new IAM Role (Optional)
RDBTools needs read-only access to S3 and ElastiCache APIs. This is an optional step.
- Login to AWS Console, and navigate to IAM screen
- Create a new IAM Role
- Under Select type of trusted entity, choose EC2. In other words, the role we are creating will be used by an EC2 instance
- Assign the following permissions:
Step 2: Launch EC2 Instance
Next, we will launch an EC2 instance.
- Navigate to EC2 under AWS Console
- Click Launch Instance
- Choose 64 bit Amazon Linux AMI
- Choose at least a t2.medium instance. The size of the instance depends on the memory used by your ElastiCache instance that you wish to analyze
- Under Configure Instance:
- Choose the VPC that has your ElastiCache instances
- Choose a subnet that has network access to your ElastiCache instances
- Ensure that your EC2 instance has a public IP Address
- Assign the IAM role that you created in Step 1
- Under the storage section, ensure at least 100 GiB storage
- Under security group, ensure that:
- Incoming traffic is allowed on port 80 and 443
- Incoming traffic is allowed on port 22 only during installation
- Review and launch the ec2 instance
Step 3: Verify Permissions & Connectivity
Next, we will verify the EC2 instance has the required IAM permissions, and can connect to ElastiCache Redis instances.
- SSH into the newly launched EC2 instance
- Open a command prompt
- Run the command
aws s3 ls. This should list S3 buckets
- If the
awscommand cannot be found, make sure your ec2 instance is based of amazon linux
- If the
- Next, find the hostname an ElastiCache instance you wish to analyze, and run the command
echo info | nc <redis host> 6379
- If you see some details about the ElastiCache redis instance, you can proceed to the next step
- If you cannot connect to redis, you should review your VPC, subnet, and security group settings.
Step 4: Install Docker on EC2
Next, we will install Docker on the EC2 instance. Run the following commands:
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
- Log out and log back in again to pick up the new docker group permissions.
- To verify, run
docker ps. You should see some output without having to run sudo
Step 5: Run RDBTools Docker Container
Finally, we can now install RDBTools. Run the following command
docker run -v rdbtools:/db -p 80:8001 rdbtools/rdbtools:v0.9.35
This command will download and run the RDBTools docker image and expose it as a web page on port 80.
Find the IP Address of your EC2 instances, and a launch your browser to http://
In this guide, we installed RDBTools on an EC2 instance running Docker. As a next step, you should now add an ElastiCache Redis Instance and then run the memory analysis.
Next: Activating RDBTools