Heroku Redis Maintenance Windows
Last updated 17 May 2019
Table of Contents
From time to time, Heroku must take your Redis instance offline to perform maintenance tasks. Typical tasks include upgrading the underlying infrastructure of your instance (for example, patching the operating system or required libraries) or upgrading Redis itself. This maintenance is handled automatically by Heroku.
Maintenance windows are available for all premium Redis plans.
Checking if maintenance is required for your Redis instance
You can check if maintenance is required on your Redis instance by using the
$ heroku redis:info === redis-softly-4514 (REDIS_URL) Plan: Premium 7 Status: available ... Maintenance: required by 2016-02-01 00:00:00 +0000
Setting a maintenance window
Users can specify the day of week and time (UTC) at which the maintenance will occur:
$ heroku redis:maintenance --window="Sunday 14:30"
Setting a maintenance window allows you to minimize the impact on your application and users. We recommend selecting a time when maintenance would have the least impact on your business. Maintenance windows are 4 hours long starting at the time you specify. The actual time required for maintenance depends on exactly what’s taking place, but it will usually require your Redis instance to be offline for only a few minutes. If you don’t specify a window, one will be selected randomly.
Maintenance windows that can be set and manual maintenance runs are only available on premium plans.
Heroku will make the best effort to honor your maintenance window request but it is not guaranteed. If there is an emergency where the security or integrity of your data is threatened, we may perform the maintenance outside of your regular window at our discretion.
Will my app experience downtime?
Any maintenance will require some downtime. If you are on an HA plan (Premium/Private tier), you are already aware of this as you have taken steps to protect yourself in the event of an outage. If you are not on an HA plan, we are taking steps to ensure minimal downtime for your application. HA plans will experience some time after a maintenance where HA is unavailable while a new HA follower is created and caught up.
When the maintenance is triggered, the Primary Redis will failover to the Standby Redis. Your total downtime will depend on your applications ability to recover from that failover. This downtime, for most customers, is measured in a handful of minutes.
Do I need to do anything to perform the maintenance?
There are three different ways for maintenance to occur. The most common way is to do let Heroku perform the maintenance for you. We use your databases maintenance window to determine the best time to run this maintenance automatically.
The following two methods are triggered manually by you.
If you wish to run your maintenance manually you can do so in one of two ways. The via heroku redis:maintenance –force. This will immediately fail over to your HA Standby or the hidden Standby if it is caught up. Your application will immediately restart and be pointed to new Primary (former Standby).
The other method involves putting your application into maintenance mode before performing the failover. This can have benefits such as providing a clean landing page for your users, but total downtime can be longer as it is a manual process to enable and disable maintenance mode. We have more detailed information on the maintenance mode page.