What are the upcoming changes to the REDIS_URL config var for Heroku Key-Value Store Mini add-ons?

Issue

You want to know what changes you must make for the upcoming changes to REDIS_URL.

Resolution

We changed the REDIS_URL config var to be the secure TLS connection URL for all mini Heroku Key-Value Store add-on plans. We'll begin rolling REDIS_URL config vars for mini add-on plans to the TLS connection.

If you previously transferred your REDIS_URL configuration to REDIS_TEMPORARY_URL to prepare your app for supporting TLS, you must use REDIS_URL by December 2, 2024. By that date, all Redis connections will require TLS, and REDIS_TEMPORARY_URL and REDIS_TLS_URL will reach end-of-life.

Many language clients support both rediss:// and redis:// for TLS connections. You can test with REDIS_TLS_URL today on a test app with your client to see if rediss:// or redis:// are compatible. If your test app is compatible with your client, then no change is necessary. See Connecting to Heroku Key-Value Store on how to connect to your Key-Value Store instance.

Here are the recommended application changes on mini plans:

  • REDIS_URL --> REDIS_TEMPORARY_URL: If you must keep your insecure connections to plan for updating your Redis client configurations to support TLS, use this config var to prepare your app for supporting TLS.
  • REDIS_TEMPORARY_URL --> REDIS_URL: Before REDIS_TEMPORARY_URL is no longer available on December 2, 2024, use this config var when TLS becomes the required and default connection and your app supports TLS and rediss://.
  • REDIS_TLS_URL --> REDIS_URL: After September 30, 2024, REDIS_URL becomes the secure TLS connection URL. Use this config var before REDIS_TLS_URL is deprecated on December 2, 2024.

Preparing for the change

Ensure all libraries that connect to Redis, such as redis, are updated. You must also deactivate SSL verification for the mini instance connections. For details, see Connecting to Heroku Key-Value Store.

Before December 2nd, we suggest you ensure that your application can connect to a Redis TLS connection in a staging application. Here is an example of that for a Ruby on Rails application:

# config/application.rb
if redis_url = ENV["REDIS_TLS_URL"]
  ENV["REDIS_URL"] = redis_url
  warn "Using secure redis URL"
else
  warn "No REDIS_TLS_URL environment variable set"
end

If your application can connect and run to the secure URL on the REDIS_TLS_URL environment variable, it will be prepared for this change.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support