Disable AOF

Updated at:

AOF (append-only file) persistence is enabled by default for Tair (Redis OSS-compatible) instances. If your instance experiences request latency, jitter, or timeouts caused by AOF overhead, disable AOF by setting the appendonly parameter to no.

How AOF works

Tair (Redis OSS-compatible) supports two persistence options: AOF and Redis Database (RDB). With AOF enabled, the instance logs every write operation (such as SET) to an append-only file. When the file grows too large, the instance rewrites it automatically to reduce disk usage.

Rewrite trigger: An AOF rewrite runs when the AOF size exceeds 25% of instance memory and has grown more than 200% since the last rewrite (base rewrite). For empty instances, the base rewrite size is 1 byte.

Sync policy: Tair uses the AOF_FSYNC_EVERYSEC policy, which asynchronously flushes the AOF buffer to disk every second. This minimizes the performance impact of AOF on the instance.

When to disable AOF

Disable AOF when your instance experiences request latency, jitter, or timeouts caused by AOF overhead.

Warning

If you use Tair (Enterprise Edition) with Global Distributed Cache or data flashback (point-in-time data restoration) enabled, you cannot disable AOF.

Effects of changing the appendonly parameter

Change

Effect

appendonly: yesno

AOF is disabled immediately. No restart required.

appendonly: noyes

AOF is enabled immediately. No restart required. After AOF is enabled, the instance performs periodic rewrites to compress the AOF file, which may cause a slight increase in latency (on the order of milliseconds).

Default: AOF is enabled by default for all Tair and Redis Open-Source Edition instances, except Tair persistent memory-optimized instances.

Configure the appendonly parameter

Prerequisites

Before you begin, make sure you have:

Steps

  1. Log in to the console and go to the Instances page. In the top navigation bar, select the region where your instance resides. Find the instance and click its ID.

  2. In the left-side navigation pane, click Parameter Settings.

  3. On the System Parameters page, find the appendonly parameter and click Modify in the Actions column.

  4. In the dialog box, set the appendonly parameter:

    • yes: enables AOF persistence

    • no: disables AOF persistence

  5. Click OK.

Warning

After AOF is disabled, the instance relies only on RDB backups for data recovery. In extreme failure scenarios (such as simultaneous failures of the master and replica nodes or an outage of the entire zone where the instance resides), data written after the most recent RDB backup may not be recoverable. If your business requires high data recoverability, we recommend that you keep AOF enabled.

FAQ

Can I restore data that I accidentally deleted after disabling AOF?

Yes. Disabling AOF does not affect the full backup of the instance. Restore your data using the full backup feature.

API reference

Operation

Description

DescribeParameters

Queries the configuration and operational parameters of an instance.

ModifyInstanceConfig

Modifies the parameter settings of an instance.