[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[],[],null,["# Manage read replicas\n\nThis page provides instructions for enabling and managing [read replicas](/memorystore/docs/redis/read-replicas).\n\nCreating a Redis instance with read replicas\n--------------------------------------------\n\n### Console\n\n| **Note:** Once you create and instance with read replicas, read replicas can't be disabled for that instance.\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click **Create Instance**.\n\n3. Follow the instructions at [Creating a Redis instance on a VPC network](/memorystore/docs/redis/create-manage-instances#creating_a_redis_instance_on_a_vpc_network),\n but return to these instructions when selecting **Tier**.\n\n4. Choose **Standard** tier.\n\n5. Under the **Configure read replicas** dropdown, select your desired number\n of read replicas.\n\n6. Return to the [Creating a Redis instance on a VPC network](/memorystore/docs/redis/create-manage-instances#creating_a_redis_instance_on_a_vpc_network)\n instructions for additional guidance on other Memorystore\n configurations, or click the **Create** button.\n\n### gcloud\n\n| **Note:** Once you create and instance with read replicas, read replicas can't be disabled for that instance.\n\nEnter the following command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate\nvalues: \n\n```\ngcloud redis instances create instance-id --size=size --region=region-id --replica-count=count --read-replicas-mode=read-replicas-enabled --tier=standard\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003ecount\u003c/var\u003e is a value from 1 to 5. This sets the number of read replicas.\n\nEnabling read replicas on existing Redis instances\n--------------------------------------------------\n\n### Console\n\n| **Important:**\n| - Enabling [read replicas](/memorystore/docs/redis/read-replicas) on an existing Redis instance is an exclusive operation, meaning you cannot perform other [update operation](/sdk/gcloud/reference/redis/instances/update) instance modifications as a part of the same operation that enables read replicas.\n| - After enabling read replicas, [scale the node count](/memorystore/docs/redis/managing-read-replicas#adding_or_removing_replica_nodes_from_your_redis_instance) to your desired number of read replicas.\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console.\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the ID of the instance.\n\n3. Under the **Configuration** section, next to **Read Replicas** ,\n click **ENABLE**.\n\n4. **(Optional)** Specify a custom IP range\n\n - If your instance uses the direct peering [connection mode](/memorystore/docs/redis/networking#connection_modes),\n you can enter a specific CIDR range with a block size of at least `/28`,\n as long as it doesn't overlap with any other existing ranges.\n For example, you could enter `10.100.0.0/28`.\n\n - If your instance uses the private services access [connection mode](/memorystore/docs/redis/networking#connection_modes),\n you can choose an existing allocated range of size `/28` from the\n dropdown menu. For instructions on allocating an IP address range\n viewable from the dropdown menu, see\n [Creating an IP allocation](/vpc/docs/configure-private-services-access#procedure).\n\n5. Click **Enable Read Replicas**.\n\n### gcloud\n\n| **Important:** Enabling [read replicas](/memorystore/docs/redis/read-replicas) on an existing Redis instance is an exclusive operation, meaning you cannot perform other [update operation](/sdk/gcloud/reference/redis/instances/update) instance modifications as a part of the same operation that enables read replicas. \n|\n| After enabling read replicas, [scale the node count](/memorystore/docs/redis/managing-read-replicas#adding_or_removing_replica_nodes_from_your_redis_instance) to your desired number of read replicas.\n\nTo enable read replicas for your instance, enter the following command,\nreplacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values. \n\n```\ngcloud redis instances update INSTANCE_ID --read-replicas-mode=READ_REPLICAS_ENABLED --secondary-ip-range=SECONDARY_RANGE\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003eINSTANCE_ID\u003c/var\u003e is the ID of the instance for which you're enabling read replicas.\n- \u003cvar translate=\"no\"\u003eSECONDARY_RANGE\u003c/var\u003e is one of the following options:\n - `auto`. `auto` is supported for both networking connection modes.\n - If your instance uses the [direct peering connection mode](/memorystore/docs/redis/networking#direct_peering) you must provide a [valid CIDR IP address range](/memorystore/docs/redis/networking#supported_and_unsupported_networks) of size `/28`. For example, `--secondary-ip-range=10.100.0.0/28`.\n - If your instance uses the [private services access connection mode](/memorystore/docs/redis/networking#private_services_access) you must provide the name of an [allocated range](/vpc/docs/configure-private-services-access#procedure) of size `/28`. For example, `--secondary-ip-range=my-secondary-range-memorystore`.\n\nScaling read replica enabled instances\n--------------------------------------\n\n#### Adding or removing replica nodes from your Redis instance\n\n### Console\n\n1. Go to the Memorystore for Redis page in the Google Cloud console. \n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the Instance ID of the instance to which you want to add/remove replica nodes.\n3. Click **Edit**.\n4. Under **Configure read replicas**, enter your desired number of replicas.\n5. Click **Save**.\n\n### gcloud\n\nEnter the following command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate\nvalues: \n\n```\ngcloud redis instances update instance-id --region=region-id --replica-count=count\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003ecount\u003c/var\u003e is a value from 1 to 5. This sets the number of read replicas.\n\n#### Scaling the size of Redis nodes\n\n### Console\n\n1. Go to the Memorystore for Redis page in the Google Cloud console. \n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the Instance ID of the instance you want to resize.\n3. Click **Edit**.\n4. Under **Capacity**, enter a new size in the field to update the instance's capacity.\n5. Click **Save**.\n\n### gcloud\n\nEnter the following command, replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate\nvalues: \n\n```\ngcloud redis instances update instance-id --region=region-id --size=size\n```\n\nWhere:\n\n- \u003cvar translate=\"no\"\u003esize\u003c/var\u003e is the size of each Redis node in your instance, including the primary node. For example, if you have a read replica enabled instance with six nodes (including the primary node) with `--size=10`, your total instance size is 60 GiB.\n\nConnecting to your instance using the read endpoint\n---------------------------------------------------\n\nFor instructions on using the read endpoint to connect to your instance, see\n[Connecting to a Redis instance using the read endpoint](/memorystore/docs/redis/connecting-redis-instance#connecting_to_a_redis_instance_using_the_read_endpoint).\n\nViewing read replica information for your instance\n--------------------------------------------------\n\nTo find information about read replicas for your instance, run the following\ncommand replacing \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values: \n\n```\ngcloud redis instances describe instance-id --region=region-id\n```\n\nIn the metadata output from the previous command:\n\n- `readEndpoint:` shows the read endpoint IP address.\n- `readEndpointPort` shows the read endpoint port number.\n- `readReplicasMode` shows if read replicas have been enabled.\n- `readReplicaCount` shows the number of replicas the instance has.\n- `nodes:` displays each replica node ID, and the region where each replica node is located."]]