This add-on is operated by Redis Labs
Low-latency, production-ready Redis instances for your Heroku applications.
Last updated 07 May 2015
This article is a work in progress, or documents a feature that is not yet released to all users. This article is unlisted. Only those with the link can access it.
Table of Contents
This add-on have been deprecated, and is now disabled for new installs.
MyRedis can be installed to your Heroku application via the CLI:
$ heroku addons:create myredis:test -----> Adding myredis to cryptic-eyrie-2652... done, v138 (free)
During our beta stage, only our free 100 MB test plan is available.
Once installed, a
MYREDIS_URL environment variable will be added to your application’s configuration that contains the URI to be used within your Redis library/driver. This can be confirmed using the
heroku config:get command.
$ heroku config:get MYREDIS_URL redis://:firstname.lastname@example.org:6123/
Note that while you will receive your MyRedis connection URI immediately, it may take around 30 seconds to spin up your Redis instance into an online and usable state.
After provisioning the add-on it’s necessary to locally replicate the config vars so your development environment can operate against the service.
Use Foreman to configure, run and manage process types specified in your app’s Procfile. Foreman reads configuration variables from an .env file. Use the following command to add the MYREDIS_URL values retrieved from heroku config to
$ heroku config -s | grep MYREDIS_URL >> .env $ more .env
Credentials and other sensitive configuration values should not be committed to source-control. Exclude your
.env file from git with
echo .env >> .gitignore.
Using with Rails 3.x
Ruby on Rails applications will need to add the following entry into their
Gemfile specifying the Redis client library.
gem 'redis' gem 'hiredis' # Only if you wish to compile native C extensions for your platform, omit if not.
Update application dependencies with bundler.
$ bundle install
You can now access your MyRedis instance within Ruby:
$redis = Redis.new url: ENV['MYREDIS_URL']
Using with Node.js
We recommend the redis-url package for Node.js:
$ npm install redis-url
Your Redis instance then becomes available with this one-liner:
var redis = require("redis-url").connect(process.env.MYREDIS_URL);
Refer to node_redis for a full list of supported commands and usage examples.
For more information on features available within the MyRedis dashboard please see our documentation.
The MyRedis dashboard allows you to manage your Redis instance. The dashboard can be opened via the CLI:
$ heroku addons:open myredis Opening myredis for cryptic-eyrie-2652…
or by visiting your Heroku apps console, selecting the application with MyRedis installed, and clicking on MyRedis from the Add-ons menu.
Migrating between plans
Migrating to a new plan may require that we restart your MyRedis instance. Application owners should carefully manage the migration timing to ensure proper application function during the migration process.
heroku addons:upgrade command to migrate to a new plan.
$ heroku addons:upgrade myredis:newplan -----> Upgrading myredis:newplan to cryptic-eyrie-2652... done, v138 ($49/mo) Your plan has been updated to: myredis:newplan
Removing the add-on
MyRedis can be removed via the CLI.
This will destroy all associated data and cannot be undone!
$ heroku addons:destroy myredis -----> Removing myredis from cryptic-eyrie-2652... done, v140 (free)
Before removing MyRedis, we recommend exporting your data by slaving your MyRedis instance to another Redis server running as master. We can also provide a downloadable dump file for manually importing into another Redis server.
Additional resources are available at: