304 North Cardinal St.
Dorchester Center, MA 02124
Before moving on to our topic of deploying Redis on Heroku, i would like to give a brief overview what redis is actually !
Redis is a :
Redis has unique abilities like ultra-fast lua-scripts. Its execution time equals to C commands execution. This also brings atomicity for sophisticated Redis data manipulation required for work many advanced objects like Locks and Semaphores.
No, Redis is much more than a cache.
Like a Cache, Redis stores key value pairs. But unlike a cache, Redis lets you operate on the values. There are 5 data types in Redis – Strings, Sets, Hash, Lists and Sorted Sets. Each data type exposes various operations.
The best way to understand Redis is to model an application without thinking about how you are going to store it in a database.
To run redis on heroku we can achieve it using an heroku add on – Redis to go.
heroku addons:create heroku-redis:hobby-dev -a sushi
State “creating” means that it is still provisioning and not yet ready. Once Heroku Redis has been created, the new release will be created and the application will restart.
REDIS_URLconfig var will be made available in the app configuration and will contain the URL used to access the newly provisioned Heroku Redis instance. This can be confirmed using the
heroku config | grep REDIS
Thats it. By this time your dB instance must be up and running.
For other options and configurations such as :
Establish the primary instance
Promoting an instance
Version support and legacy infrastructure , kindly visit the official Herko -redis documentation .