[[["容易理解","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,["# About AOF persistence\n\nThis page provides an overview of AOF persistence for Memorystore for Redis Cluster.\n\nMemorystore for Redis Cluster also supports RDB persistence, but you must choose either the\nAOF or RDB persistence mode, because both can't be enabled at the same time. For\ninformation about choosing between the two persistence modes, see [Persistence overview](/memorystore/docs/cluster/persistence-overview).\n\nFor the best possible instance availability, we recommend using a [highly available instance](/memorystore/docs/cluster/ha-and-replicas)\nin addition to enabling persistence.\n\nTo learn how to enable, disable, and monitor AOF persistence, see [Manage persistence](/memorystore/docs/cluster/manage-persistence).\n\nAOF persistence overview\n------------------------\n\nThe Redis AOF (Append Only File) persistence mode prioritizes data durability.\nIt durably stores data by recording every write command to a log file called the\nAOF file. If a system failure or restart occurs, the server replays AOF file\ncommands sequentially to restore your data. Unlike RDB persistence, AOF\npersistence can't be paused.\n| **Note:** If you [enable or disable persistence](/memorystore/docs/cluster/manage-persistence#enable_aof_persistence_for_an_existing_instance) for an existing instance, then the instance might need to perform [maintenance](/memorystore/docs/cluster/about-maintenance).\n\n### Sync setting\n\nThe sync setting (`appendfsync`) for the AOF persistence mode determines how\noften the cached data in memory is saved to durable storage. We recommend\nkeeping the sync setting at 1 second, which is the default. Syncing every second\nprovides the best compromise between instance performance, and data durability.\n\nBefore the AOF logs are saved to durable storage, they are stored in memory by the operating system, and\nif a system failure or restart occurs during this time, the writes in memory can\nbe lost. The sync setting lets you choose how often data is saved to durable\nstorage, and provides the following options:\n\n- `always` - This option saves data to storage for every write.\n- `everysec` - This option saves data to storage every second.\n- `no` - This option relies on the operating system to flush data to disk on its own schedule, which typically happens every 30 seconds.\n\nChoosing to sync for every write provides the best data durability, however this\ncomes with a performance tradeoff. We recommend syncing every second, which\nprovides both good data durability and performance."]]