Skip to main content

Enable tiered storage for Aiven for Apache Kafka®

Tiered storage significantly improves the storage efficiency of your Aiven for Apache Kafka® service.

Prerequisites

  • Access to an Aiven organization and at least one project.
  • Aiven for Apache Kafka® service with Apache Kafka version 3.6 or later. Upgrade to the latest default version and apply maintenance updates for the latest fixes and improvements when using tiered storage.
  • Aiven CLI.
note

Review the trade-offs and limitations of tiered storage before enabling it.

Steps to enable tiered storage

  1. Log in to the Aiven console, and select your project.
  2. Create an Aiven for Apache Kafka service or select an existing one.
    • For a new service:

      1. On the Create Apache Kafka® service page, scroll down to the Tiered storage section.
      2. Click Enable tiered storage.
      3. View the pricing for tiered storage in the Service summary.
    • For an existing service:

      1. Go to the service's Overview page and click Service settings from the sidebar.
      2. In the Service plan section, click Enable tiered storage to activate it.
      3. Click Activate tiered storage in the confirmation window.

After activating tiered storage for your service and configuring it for your topics, you can monitor usage and costs in the Tiered storage overview section.

note

Alternatively, if tiered storage is not yet active for your service, you can enable it by selecting Tiered storage from the sidebar.

Configure default retention policies at service-level

To manage data retention, set default policies for tiered storage at the service level.

  1. Access Aiven console, select your project, and choose your Aiven for Apache Kafka service.
  2. Click Service settings from the sidebar.
  3. Scroll to the Advanced configuration section, and click Configure.
  4. In the Advanced configuration dialog, click Add Advanced Configuration.
  5. Define the retention policy:
    • Find kafka.log_local_retention_ms and set the value to define the retention period in milliseconds for time-based retention.
    • Find kafka.log_local_retention_bytes and set the value to define the retention limit in bytes for size-based retention.
  6. Click Save configuration to apply your changes.

You can also configure the retention policies from the Tiered storage overview page.

Optional: Configure client-side parameter

For optimal performance and reduced risk of broker interruptions when using tiered storage, it is recommended to update the client-side parameter fetch.max.wait.ms from its default value of 500 ms to 5000 ms.

This consumer configuration is no longer necessary starting from Apache Kafka version 3.6.2. Consider upgrading to Apache Kafka version 3.6.2 or later before enabling tiered storage.