Blog

Apache Kafka Remote Log Storage: Practical Architecture Guide

Kafka operators usually meet remote log storage after the same pattern repeats: retention grows, broker disks fill faster than expected, and adding brokers starts to feel like an expensive way to buy storage. The cluster might not need more CPU or network headroom. It needs somewhere else to keep older log segments.

Apache Kafka remote log storage, often discussed under Apache Kafka tiered storage, addresses that pressure by adding a remote tier for completed log segments. Hot data remains local to brokers for normal tail reads. Older segments can be copied to remote storage, such as object storage through a plugin, and fetched back through Kafka when a consumer needs historical data. It changes the retention equation, the recovery path, and the operational contract between brokers and storage.

It also has a clear boundary. Kafka remote log storage reduces local disk pressure and makes longer retention more practical, but the broker still owns local primary storage for active data. If your goal is stateless brokers, fast scaling, or storage-compute separation, you are comparing tiered storage with Shared Storage architecture patterns rather than tuning one Kafka feature.

Apache Kafka Remote Log Storage Flow

What Remote Log Storage Actually Does

Remote log storage splits Kafka log retention into two concerns. The local tier keeps the active part of the log on broker disks, where Kafka's existing append, replication, and fetch path remain optimized for low-latency streaming. The remote tier keeps eligible, rolled log segments outside the broker's local disks. When local retention removes older segments, Kafka can still serve reads for offsets that exist in the remote tier.

That distinction matters because Kafka's storage cost is driven heavily by retention. A high-throughput topic with long retention forces the cluster to hold more data per broker. In classic Kafka, operators often add brokers or larger disks even when compute is not the bottleneck. Remote log storage lets teams reduce the local data each broker carries while preserving a longer logical retention window.

The feature is best understood as a retention and disk-relief mechanism:

  • It keeps older, less frequently accessed data outside broker-local disks.
  • It reduces the local data that may need to be copied during broker replacement or partition rebalancing.
  • It allows longer Kafka retention without making every broker store the full historical window.
  • It keeps old-data replay inside Kafka instead of forcing consumers onto a separate archive path.

How the Architecture Works

The core idea from KIP-405 is straightforward: when a log segment is no longer active and is safe to tier, Kafka copies the segment and related indexes to remote storage. Metadata is tracked separately so the broker can locate the correct remote object when a fetch request asks for an older offset.

The implementation is made of several moving parts:

  • Local log segments remain the source for active writes and tail reads.
  • A remote log manager coordinates copy, read, and delete work for remote segments.
  • A remote storage manager plugin handles the actual remote storage operations.
  • A remote log metadata manager tracks which topic-partition segments exist remotely, their offsets, leader epochs, and lifecycle state.
  • The fetch path decides whether requested offsets can be served locally or require remote reads.

In practice, this means the broker still sits in the data path. Kafka clients do not fetch remote objects directly. A consumer sends a normal fetch request to Kafka; the broker determines whether the requested data is local or remote; if the data is remote, the broker reads the segment and index data from the remote tier and returns records through the Kafka protocol. That preserves client compatibility and avoids bypassing Kafka authorization, quotas, and protocol behavior.

The lifecycle starts on the local log. Kafka writes records into the active segment. When that segment rolls and becomes eligible, remote log storage can upload the completed segment and associated index files. Kafka must not delete local data before the remote copy is durable and discoverable through metadata. Once the remote copy is ready, local cleanup can remove the segment while Kafka retains the ability to serve older offsets.

The metadata path is as important as the object path. Remote storage systems are good at holding large objects, but Kafka needs strongly consistent knowledge of which segment contains a given offset. If metadata is stale, missing, or inconsistent, fetches and cleanup become risky. For operators, metadata health is a production concern, not an implementation detail.

Local Segments Still Matter

Remote log storage does not remove local disks from Apache Kafka. It narrows what local disks are responsible for. The local tier still absorbs writes, serves hot reads, stores active segments, participates in replication, and remains sensitive to page cache, disk I/O, and broker sizing.

This is why local retention settings require careful thought. If the local retention window is too short, more backfill and catch-up traffic will hit the remote tier. If it is too long, brokers keep carrying a large local storage burden and the benefit of tiering shrinks. The right value depends on consumer lag patterns, incident recovery behavior, and how often teams replay historical data.

For many production clusters, the useful question is not "how low can local retention go?" It is "how much local data is needed to keep normal operations local?" That includes routine consumer restarts, rolling deploys, stream processing recovery, and short-lived downstream outages.

Remote Fetch Changes The Latency Contract

The visible behavior of Kafka remains familiar, but remote reads are not local reads. A fetch that touches remote storage may require metadata lookup, remote index access, object retrieval, buffering, and transfer back through the broker. Object stores have different latency and request-cost characteristics than local disks or page cache.

This creates a two-tier performance model:

Read patternExpected pathOperational implication
Tail readsLocal broker storageOptimized for normal streaming consumers
Short catch-upUsually local if local retention covers lagTune local retention around common recovery windows
Historical replayRemote tierExpect higher latency and object-store request costs
Large backfillRemote tier plus broker networkPlan capacity so backfill does not disturb hot traffic

Backfill deserves special attention. Many consumers replaying remote data at once can pressure object storage, broker network, and remote read thread pools. The broker becomes a bridge between the remote tier and Kafka clients, so remote fetch is not "free" from a broker capacity perspective.

Remote log storage can lower local disk requirements, but object storage introduces its own line items: stored bytes, GET requests, metadata-related operations depending on the plugin design, data retrieval, and network transfer. The economics should be modeled with workload shape rather than assumed from storage price per GiB alone.

Production Considerations

Remote log storage is an architecture feature, not a checkbox. A production rollout should include a readiness pass across latency, cost, failure modes, and operational visibility.

Production Readiness Checklist

Start with version and feature maturity. Kafka's tiered storage behavior, configuration names, and plugin ecosystem can vary by Kafka release and distribution. Treat the current Apache Kafka documentation as the source of truth, and test with the exact version you plan to run.

Then decide where remote storage belongs in the workload contract:

  • Define the expected local retention window for normal consumer recovery.
  • Estimate how often historical replay will happen and how much data it reads.
  • Set quotas or operational procedures for large backfills.
  • Test remote fetch latency before promising replay service-level objectives.
  • Include remote storage request costs in capacity planning.
  • Validate deletion behavior, topic lifecycle handling, and object cleanup.

Monitoring should cover both Kafka and the remote tier. On the Kafka side, watch copy lag, failed uploads, failed fetches, remote read latency, throughput, local cleanup, metadata health, and thread pool saturation. On the storage side, watch request rate, throttling, error codes, object latency, lifecycle policies, and cost changes.

Failure handling is the part teams tend to under-design. Ask what happens when the remote store returns errors, throttles requests, or has elevated latency. Ask whether a broker replacement can restore service without downloading the full historical dataset. Ask how operators prove that every segment eligible for local deletion has already been safely copied and indexed remotely.

A good rollout pattern is to enable the capability on a narrow set of topics first, with explicit replay tests and failure drills. The first goal is to build trust in the lifecycle. Once operators know how upload, fetch, cleanup, and recovery behave under real load, local retention can be tightened with less guesswork.

Remote Log Storage Vs Shared Storage

Remote log storage and Shared Storage architecture both use external storage, but they solve different problems. Remote log storage keeps Kafka's local-log design for active data and adds a remote tier for older segments. Shared Storage architecture moves durable primary storage away from broker-local disks as a core architectural choice.

That boundary matters for platform teams. If your main problem is "we need longer retention without scaling broker disks," Apache Kafka remote log storage is a direct fit. If your main problem is "brokers are too stateful, scaling requires too much data movement, and recovery depends on local disk ownership," then remote log storage is only part of the answer.

RLS vs Shared Storage Boundary

In a tiered-storage Kafka architecture, brokers still store and replicate active log data locally. Local storage remains part of the write path and hot read path. Partition placement still matters because data locality still matters. Reassignment and recovery may improve because old segments do not all need to move locally, but the active tier is still stateful.

In a shared primary storage architecture, the design target is different. Durable data lives in shared storage, while brokers become more like stateless compute nodes over the Kafka protocol. That can change scaling, rebalancing, and recovery from large data-copy operations into metadata and compute placement operations.

The comparison is about matching architecture to the job. Remote log storage is evolutionary: it extends Apache Kafka's storage hierarchy while preserving the broker-local primary path. Shared storage is more structural: it changes where the durable source of truth lives.

Where AutoMQ Fits

AutoMQ belongs in this discussion as an example of the Shared Storage architecture path rather than as a replacement term for remote log storage. It is a Kafka-compatible cloud-native streaming system that uses object-storage-backed shared storage and stateless brokers as core design goals. From an operator's perspective, that places it on the other side of the boundary: beyond retention offload, toward storage-compute separation.

That distinction helps avoid a common evaluation mistake. If a team compares AutoMQ only against Apache Kafka remote log storage, the comparison may collapse into "which one stores older data in object storage?" The better comparison is broader:

  • Do you want to keep operating Apache Kafka and extend retention with a remote tier?
  • Do you want to reduce broker-local disk usage while preserving the existing Kafka storage model?
  • Or do you want a Kafka-compatible architecture where broker state, scaling, and recovery are redesigned around Shared Storage architecture?

For teams with stable Kafka operations and a clear long-retention problem, Apache Kafka tiered storage may be the right next step. For teams redesigning around elastic cloud infrastructure, Shared Storage architecture may deserve deeper evaluation. AutoMQ is one option in that category when Kafka protocol compatibility, object storage, and stateless broker operations are all part of the target architecture.

The practical way to decide is to write down the primary pain before choosing the mechanism. If the pain is retention, start with remote log storage. If the pain is stateful operations, disk-bound scaling, and recovery time, evaluate Shared Storage architecture.

Deployment Checklist For Operators

Before enabling Kafka remote storage on important topics, walk through the rollout like an incident review in advance:

  • Confirm the Kafka version, storage manager implementation, broker settings, topic settings, and plugin maturity.
  • Model the segment lifecycle from roll, upload, metadata update, local cleanup, remote deletion, and broker restart recovery.
  • Decide whether historical replay is self-service or a controlled maintenance action, then define throughput and concurrency guardrails.
  • Connect cost visibility before broad rollout so storage, request, retrieval, and transfer changes are visible in metrics.
  • Rehearse remote storage throttling, transient failures, broker restarts, topic deletion, and consumer replay from remote offsets.

Remote log storage works best when treated as a storage lifecycle architecture. It is less successful when treated as a magic retention multiplier.

References

FAQ

Is Kafka remote log storage the same as tiered storage?

In Apache Kafka discussions, remote log storage is the mechanism behind Kafka tiered storage. It copies eligible completed log segments to a remote tier and lets Kafka fetch older offsets from that tier when local segments have been removed.

Does remote log storage make Kafka brokers stateless?

No. Brokers still use local storage for active log segments, writes, hot reads, and replication. Remote log storage reduces how much historical data must remain local, but it does not turn the broker-local primary storage model into stateless compute.

Should all consumers read from remote storage?

Usually no. Normal streaming consumers should stay close to the head of the log and read from local broker storage. Remote reads are better treated as a path for historical replay, long catch-up, or recovery beyond the local retention window.

What should operators monitor first?

Start with remote upload failures, remote fetch failures, remote read latency, copy lag, metadata manager health, local cleanup behavior, object-store throttling, and request costs. These signals show whether the segment lifecycle is healthy and whether remote reads are becoming a routine path.

When should a team evaluate shared-storage Kafka instead?

Evaluate Shared Storage architecture when the main problem is not only retention, but broker statefulness: slow scaling, data-heavy reassignment, disk-bound recovery, and operational complexity from local data ownership. In that case, remote log storage may help, but it does not address the deeper architecture boundary.

Newsletter

Subscribe for the latest on cloud-native streaming data infrastructure, product launches, technical insights, and efficiency optimizations from the AutoMQ team.

Join developers worldwide who leverage AutoMQ's Apache 2.0 licensed platform to simplify streaming data infra. No spam, just actionable content.

I'm not a robot
reCAPTCHA

Never submit confidential or sensitive data (API keys, passwords, credit card numbers, or personal identification information) through this form.