Heroku Redis - GUI and Memory Optimization
RDBTools is an administration GUI and memory analyzer for Redis. You can use RDBTools to optimize memory used by Heroku Redis and thereby reduce the cost.
In this article, we will install RDBTools, connect Heroku Redis and analyze memory.
Step 1: Install RDBTools on your Local Machine
First, you need to install RDBTools. RDBTools ships as a docker container, so install docker and run the following command:
docker run -v rdbtools:/db -p 8001:8001 rdbtools/rdbtools:v0.9.35
Step 2: Find out Heroku Redis URL
Next, point your browser to http://localhost:8001 and follow the onscreen steps to activate your free license. The free license lets you analyze upto 512 MB memory. If you have a larger redis instance, you can still analyze the first 512 MB of data and extrapolate for your data set.
Next, we need to find out the Redis URL:
- Login to your heroku dashboard
- Select the app that has heroku redis
- Navigate to the resources tab
- Under the addons section, click “Heroku Redis”
- Under Datastore Credentials, click “View Credentials”
- Copy the Redis URI
The Redis URL will be in the format:
Step 3: Add Heroku Redis to RDBTools
Next, open RDBTools and open the Add Instance screen. Enter the host, port and password from the URL you got from above, and add the instance.
Once you add the instance, you will be taken to the overview page for your heroku redis server. From here, navigate to the Memory Analysis page, and start the memory analysis.
The memory analysis takes a few minutes, as we first download a backup file from Heroku Redis.
In this article, we installed RDBTools and connected to a Heroku Redis server. From here on, you can use RDBTools’ web interface to analyze memory usage, view recommendations, perform CRUD operations and optimize performance.