Configure a Redis instance

Memorystore for Redis supports a subset of the native Redis configuration parameters that you can modify to customize the behavior of your Redis instance. Other Redis configuration parameters are set to default values and cannot be modified. Configuration changes take place immediately, don't require a restart of the instance, and are saved if the instance restarts. You can update modifiable configuration parameters after instance creation.

For tables showing acceptable values for modifiable parameters and default values for unmodifiable parameters, see the Redis configurations reference page.

Viewing and updating configurations in the Google Cloud console

  1. Go to the Memorystore for Redis page in the Google Cloud console.
    Memorystore for Redis
  2. Click the Instance ID of the instance.
  3. Click Edit.
  4. The Configurations section is now visible. Click the trash bin to the right of a configuration to delete it, or click Add Configuration to add a new configuration.

Setting and updating configuration parameters with the Google Cloud CLI

You can set modifiable configuration parameters when creating or updating an instance. To set a configuration parameter during creation, enter the following command, replacing the highlighted-variables with the appropriate values:

gcloud redis instances create instance-id --size=size --region=region-id --zone=zone --redis-config maxmemory-policy=policy

To change a configuration parameter for an existing instance, enter the following command:

gcloud redis instances update instance-id --update-redis-config maxmemory-policy=policy

Viewing current configuration parameters with the Google Cloud CLI

To view configuration parameters that you set when creating or updating an instance, enter the describe command for the instance:

gcloud redis instances describe instance-id --region=region-id

You won't see configuration parameters when running describe unless you have changed a configuration from its default value.