Heroku redis server migration

Praaveen Vr
3 min readJun 23, 2022

Migrating the redis server from heroku redis-to-go to heroku redis

We get into the situation that our redis redis-to-go to server in heroku is shutting down their nano plan and we want it to be migrated to different service.

I have explored few add-ons from the heroku -> resources

Heroku redis, Upstash redis have the free plan and I was able to add and test it.
After, all consideration I have chosen the heroku redis for my app.

  1. Steps to add a heroku redis server with out migrating from existing server

a. heroku -> resources -> Add-ons
search for heroku redis add-on and click it. It will list out the available plan. Choose one and click it. In few minutes you can see the add-ons in list

When you check the add-ons list you can find the Heroku Redis in it. By clicking it will navigate it to pages with overview | settings.

Inside settings -> URI under ADMINISTRATION -> Data store Credentials

This URI is need to be updated in you application.

2. Steps to add a heroku redis server with migrating from existing server

existing redis server URI : redis://redistogo:cdumy67ec45…..
app-name
: heroku app name
heroku-redis : redis add on name
hobby-dev : plan name

heroku addons:create heroku-redis:hobby-dev — fork redis://redistogo:cdumy67ec45354556b6572csada447442ab4ce1ee26@sculpin.redistogo.com:10289/ -a app-name

its done !

Creating heroku-redis:hobby-dev on ⬢ app-name... $0/month
Your add-on is being provisioned and will be available shortly
redis-acute-6762 is being created in the background. The app will restart when complete...
Use heroku addons:info redis-acute-6762 to check creation progress
Use heroku addons:docs heroku-redis to view documentation

You can follow this process using heroku redis:info:

$ heroku redis:info -a app-name
===redis-acute-6762 (HEROKU_REDIS_PURPLE_URL)
Plan hobby-dev
Status Preparing (fork in progress)
Created 2015-07-20 20:30 UTC
Timeout 300
Maxmemory noeviction
Maintenance window: Mondays 22:30 to Tuesdays 02:30 UTC
Persistence: AOF

When you check the add-ons list you can find the Heroku Redis in it. By clicking it will navigate it to pages with overview | settings.

Inside settings -> URI under ADMINISTRATION -> Data store Credentials

This URI is need to be updated in you application.

For example i’m using inside rails, so I will update the URL inside the redis.rb

You can also check in the sidekiq url

https://your-app-url/admin/sidekiq/scheduled

Check the new redis url down the page and also scheduled jobs if any.

Reference

--

--