本頁面說明維護模擬作業,以及如何在 Memorystore for Redis Cluster 上執行模擬維護事件。如要進一步瞭解維護更新和維護期間,請參閱「關於維護」一文。
為確保應用程式能正確處理預定維護事件,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"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],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"]]