本页介绍了维护模拟,并说明了如何在 Memorystore for Redis 集群上运行模拟维护事件。如需详细了解维护更新和维护窗口,请参阅维护简介。
为确保应用能正确处理计划内维护事件,Memorystore for Redis Cluster 提供了模拟维护事件功能。借助此功能,您可以对实例中的所有节点执行计划内故障转移,从而模拟维护流程。此过程与常规维护操作类似。我们强烈建议您在测试环境中使用此功能,或在流量较低的时段使用此功能。如需简要了解维护流程,请参阅逐步部署策略和先创建后销毁生命周期策略。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-08。"],[],[],null,["# Simulate maintenance\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis page describes maintenance simulation and explains how to run a simulated\nmaintenance event on Memorystore for Redis Cluster. For more information about maintenance\nupdates and maintenance windows, see\n[About maintenance](/memorystore/docs/cluster/about-maintenance).\n\nTo ensure that your applications correctly handle a planned maintenance event,\nMemorystore for Redis Cluster offers a *simulate maintenance event* feature. This feature\nlets you simulate the maintenance process by performing planned failovers on all\nnodes within the instance. This process is similar to a regular maintenance\noperation. We strongly recommend that you use this feature in a test environment\nor during periods of low traffic. For an overview of the maintenance process,\nsee [Gradual deployment strategy](/memorystore/docs/cluster/about-maintenance#gradual_deployment_strategy)\nand [Create-before-destroy lifecycle strategy](/memorystore/docs/cluster/about-maintenance#create-before-destroy_lifecycle_strategy).\n\nBy observing your application's behavior during a simulated maintenance event,\nyou can identify potential issues and verify that your application can\nhandle maintenance correctly. For more information about best practices\nregarding client configurations, see [Configure your client application](/memorystore/docs/cluster/about-maintenance#configure_your_client_application).\n\nRun maintenance simulation on a cluster\n---------------------------------------\n\n### gcloud\n\n\nTo run a maintenance simulation on Memorystore for Redis Cluster,\nuse the\n[`gcloud redis clusters update`](/sdk/gcloud/reference/redis/clusters/update)\ncommand: \n\n```\ngcloud redis clusters update CLUSTER_ID \\\n--region=REGION_ID \\\n--simulate-maintenance-event\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_ID\u003c/var\u003e: the ID of the cluster for which you want to run a simulated maintenance\n- \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e: the region where your cluster is located"]]