Manage Cloud Topics
|
This feature requires an enterprise license. To get a trial license key or extend your trial period, generate a new trial license key. To purchase a license, contact Redpanda Sales. If Redpanda has enterprise features enabled and it cannot find a valid license, restrictions apply. |
Starting in v26.1, Redpanda provides Cloud Topics to support multi-modal streaming workloads in the most cost-effective way possible: as a per-topic configuration running mixed latency workloads. While standard Redpanda topics that use local storage or Tiered Storage are ideal for latency-sensitive workloads (for example, for audit logs or analytics), Cloud Topics are optimized for latency-tolerant, high-throughput workloads where cross-AZ networking charges are a major consideration that can become the dominant cost driver at high throughput. These workloads can include observability streams, offline analytics, AI/ML model training data feeds, or development environments that have flexible latency requirements.
Instead of replicating every byte across expensive network links, Cloud Topics leverage durable, inexpensive cloud storage (S3, ADLS, GCS, MinIO) as the primary mechanism to both replicate data and serve it to consumers. This eliminates over 90% of the cost of replicating data over network links in multi-AZ clusters.
The end-to-end latency experienced when using Cloud Topics can range from 500 ms to as high as a few seconds with different object stores. Lower latencies may be achievable in certain environments, but Cloud Topics is optimized for throughput rather than low latency or tightly constrained tail latency. This latency profile is often acceptable for many streaming workloads, and can unlock new streaming use cases that previously were not cost effective.
With Cloud Topics, data from the client is not acknowledged until it is uploaded to object storage. This maintains durability in the face of infrastructure failures, but results in an increase in both produce latency and end-to-end latency, driven by both batching of produced data and the inherent latency of the underlying object store. You should generally expect end-to-end latencies of 1-2 seconds with public cloud stores.
After reading this page, you will be able to:
-
Describe the latency and cost trade-offs of Cloud Topics compared to standard Redpanda topics
-
Create a Cloud Topic using rpk on a cluster that has cloud storage enabled
-
Identify Cloud Topics limitations and configurations that reduce cross-AZ networking costs
Prerequisites
-
Install or Update rpk v26.1 or later.
-
Enable cloud storage on your Redpanda cluster.
If you plan to use Cloud Topics for all new topics in a Redpanda cluster, be sure to set the following cluster-level property:
default_redpanda_storage_mode=cloudThis ensures that newly-created Redpanda topics are Cloud Topics by default. For details, see Enable Tiered Storage for a cluster.
-
Ensure that you have an Enterprise license.
To check your license status, run:
rpk cluster license info
Limitations
-
In Redpanda versions earlier than v26.2, shadow links do not support Cloud Topics.
-
After it’s created, a Cloud Topic can’t be converted back to a standard Redpanda topic that uses local storage or Tiered Storage v1. Starting in Redpanda v26.2, Cloud Topics can be converted to and from Tiered Storage v2 topics. Starting in Redpanda v26.3, you can migrate an existing local or Tiered Storage v1 topic to a Cloud Topic in place. See Migrate a Topic to Cloud Topics or Tiered Storage v2.
Create Cloud Topics
Cloud Topics don’t require a separate cluster property to enable them. When cloud storage is enabled for your cluster, you can create Cloud Topics directly.
In Redpanda versions earlier than v26.2, you must also set the cloud_topics_enabled cluster property to true and restart the cluster. This property is deprecated in v26.2 and later. For details, see Deprecated features.
|
To create a Cloud Topic, set the topic property redpanda.storage.mode to cloud:
rpk topic create -c redpanda.storage.mode=cloud <new-cloud-topic-name>
TOPIC STATUS
audit.analytics.may2025 OK
You can make a topic a Cloud Topic only at topic creation time.
In addition to replication, cross-AZ ingress (producer) and egress (consumer) traffic can also contribute substantially to cloud networking costs. When running multi-AZ clusters in general, Redpanda strongly recommends using Follower Fetching, which allows consumers to avoid crossing network zones. When possible, you can use Leader Pinning, which positions a topic’s partition leader close to the producers, providing a similar benefit for ingress traffic. These features can add additional savings to the replication cost savings of Cloud Topics. For Cloud Topics, you can also use leaderless Cloud Topics. See Reduce cross-AZ client traffic with leaderless Cloud Topics.
For client-side tuning guidance, see Configure producers for Cloud Topics.
Reduce cross-AZ client traffic with leaderless Cloud Topics
Cloud Topics already reduce cross-AZ replication traffic between brokers to metadata. Traffic between clients and brokers still crosses availability zones (AZs). In a multi-AZ cluster, every produce request goes to the partition leader. In a cluster that spans three AZs, the leader is in a different AZ from the client about two times out of three. Leaderless Cloud Topics keeps produce and fetch traffic in the client’s own AZ, for clients in every AZ at the same time. You pay for less cross-AZ networking, and partition leadership doesn’t move.
How leaderless Cloud Topics works
When a client that identifies its AZ requests metadata for a Cloud Topic, Redpanda advertises a replica in that AZ as the partition leader. This replica is the advertised leader. The broker that holds the Raft leadership of the partition is the actual leader. The client sends its produce and fetch requests to the advertised leader, as it would to any partition leader.
Figure 1, “Produce request with leaderless Cloud Topics” shows how a produce request flows. The advertised leader uploads the produced data to object storage, then forwards only the metadata for that data to the actual leader. The actual leader replicates the metadata and returns the result, and the advertised leader acknowledges the client. Only the metadata crosses AZs. The advertised leader serves fetch requests directly.
From the client’s point of view, a leaderless Cloud Topic is a regular topic. Producer ordering and idempotency are preserved, transactions are supported and can span Cloud Topics and standard topics, and consumer groups work as usual.
How Redpanda chooses the advertised leader
For each partition and client AZ, Redpanda advertises a leader as follows:
-
If the actual partition leader is in the client’s AZ, Redpanda advertises the actual leader.
-
Otherwise, Redpanda advertises a replica in the client’s AZ. The replica must be alive, not in maintenance mode, and not being moved off the partition. When more than one replica qualifies, Redpanda picks one deterministically, so every client in that AZ sees the same replica for a given partition.
-
If no replica in the client’s AZ qualifies, or if Redpanda can’t determine the client’s AZ, Redpanda advertises the actual leader.
Redpanda applies leaderless routing only to topics with redpanda.storage.mode set to cloud. A topic that was migrated to Cloud Topics uses leaderless routing only after its migration completes.
Benefits and trade-offs
Leaderless Cloud Topics has these benefits:
-
Producers and consumers in every AZ use a local replica at the same time.
-
Partition leadership doesn’t move, so leader balance across the cluster is unaffected.
-
Consumers read from the advertised leader, so they don’t fall behind the partition leader the way a follower replica can with Follower Fetching.
-
It works with the full Kafka API, including transactions, idempotent producers, and consumer groups.
Consider these trade-offs:
-
It applies only to Cloud Topics, which trade higher produce and end-to-end latency for lower cost.
-
Each produce request adds a round trip from the advertised leader to the actual leader, which can be in another AZ. This reduces cross-AZ traffic to the metadata exchange but doesn’t remove it.
-
Each client must add a
zone_idtoken to itsclient.idand use a compatible client library. A client that doesn’t identify its AZ is served by the actual leader. -
Every broker must have its
rackproperty set to its AZ, and changingrackrequires a broker restart.
Prerequisites
-
Your cluster’s brokers run in more than one AZ.
-
Every broker in the cluster runs Redpanda v26.3 or later. Leaderless Cloud Topics becomes available automatically after the cluster upgrade to v26.3 completes.
-
Every broker has the
rackbroker property set to the ID of the AZ it runs in. The client’s AZ ID must match these values exactly.A broker without a
rackvalue is never advertised as a local leader. When you enable leaderless Cloud Topics, Redpanda logs a warning that lists the brokers that have norackvalue.Changing
rackrequires a broker restart. -
The
enable_rack_awarenesscluster property istrue. See Configure rack awareness. -
Your Kafka clients can set a custom
client.id. -
Your Kafka clients use one of these client libraries, which are compatible with leaderless Cloud Topics:
-
Apache Kafka Java client
-
franz-go
-
librdkafka 2.8 or later
-
Sarama
Only librdkafka has a minimum version. For the other libraries, follow the general guidance in Kafka client compatibility.
-
Choose a way to reduce cross-AZ client traffic
Leaderless Cloud Topics, Follower Fetching, and Leader Pinning all reduce cross-AZ traffic between clients and brokers, in different ways:
| Follower Fetching | Leader Pinning | Leaderless Cloud Topics | |
|---|---|---|---|
Traffic kept in the client’s AZ |
Consume traffic only |
Produce traffic, and consume traffic for consumers in the preferred AZs |
Produce and consume traffic |
Topics |
All topics |
All topics |
Cloud Topics only |
Clients in several AZs |
Each consumer reads from a replica in its AZ |
Only clients in the preferred AZs stay local |
Each client uses a replica in its AZ |
How a client or topic declares its location |
|
|
|
Main trade-off |
A follower can trail the leader by about one heartbeat interval, and produce traffic still crosses AZs. |
Partition leaders and their load concentrate in the preferred AZs. |
Higher Cloud Topics latency, and a metadata round trip to the actual leader for each produce request. |
Use these guidelines to choose:
-
Use Leader Pinning when most of your producers run in one AZ, or in a known set of AZs, and the topic is a standard topic or a Cloud Topic.
-
Use Follower Fetching when consumers run in several AZs and can read slightly behind the partition leader.
-
Use leaderless Cloud Topics when producers and consumers run in several AZs, and the topic is a Cloud Topic or can be one.
For leaderless Cloud Topics, consumers fetch from the advertised leader, and Redpanda ignores
client.rack. You don’t need Follower Fetching for those topics.
Enable leaderless Cloud Topics
-
Enable leaderless routing and client AZ resolution:
rpk cluster config set cloud_topics_leaderless_enabled true rpk cluster config set cloud_topics_az_client_id_token_enabled trueBoth properties are required. If you enable only
cloud_topics_leaderless_enabled, Redpanda can’t resolve any client’s AZ and serves every client from the actual partition leader. Neither property requires a restart. -
In each Kafka client, add a
zone_id={<az-id>}token to the client’sclient.id, where<az-id>matches therackvalue of the brokers in the client’s AZ. The braces are part of the token. The token can go anywhere inclient.id, so you can append it to the client ID you already use.For example, the brokers in AZ
use1-az2have thisrackvalue inredpanda.yaml:redpanda: rack: use1-az2A client that runs in
use1-az2adds the matching token to its client ID:Java client propertiesclient.id=orders-service-zone_id={use1-az2}Python (confluent-kafka)producer = Producer({ "bootstrap.servers": "<bootstrap-servers>", # In an f-string, double the braces: f"orders-service-zone_id={{{az}}}" "client.id": "orders-service-zone_id={use1-az2}", })Each AZ’s deployment of a service needs its own token. The same service running in
use1-az1usesorders-service-zone_id={use1-az1}.The AZ ID can contain letters, digits, hyphens, and underscores, and can be up to 64 characters long. Redpanda ignores a token that doesn’t meet these rules and serves that client from the actual partition leader.
The
zone_idtoken is the only way for a client to declare its AZ. Redpanda doesn’t useclient.rackfor this.
Verify leaderless routing
To check which broker Redpanda advertises to a client in a given AZ, describe the topic’s partitions with that client’s client.id and compare the result with a plain request:
rpk topic describe <cloud-topic-name> -p
rpk topic describe <cloud-topic-name> -p -X globals.kafka_protocol_request_client_id='my-client-zone_id={<az-id>}'
For partitions whose actual leader is in another AZ, the second command shows a broker in <az-id> in the LEADER column.
To confirm that client traffic stays in the AZ, use these metrics. redpanda_kafka_request_bytes_az_local_total is on the public metrics endpoint (/public_metrics). The vectorized_cloud_topics_* metrics are internal metrics, so they’re only on the internal metrics endpoint (/metrics).
| Metric | What it shows |
|---|---|
|
Produce and fetch bytes on each broker, labeled by |
|
Advertised-leader decisions, labeled by |
|
Attempts to resolve a client’s AZ from its |
|
|
|
How often this broker stopped being eligible as a local leader, labeled by |
|
Produce requests that this broker forwarded to the actual partition leader. |
|
Forwarded requests that failed, labeled by |
|
Latency histogram of forwarded produce requests. |
Forwarded requests time out after cloud_topics_leaderless_rpc_timeout_ms (default: 10 seconds).
Disable leaderless Cloud Topics
To stop advertising local replicas, set cloud_topics_leaderless_enabled to false:
rpk cluster config set cloud_topics_leaderless_enabled false
Clients return to the actual partition leader at their next metadata refresh. In-flight idempotent producers finish without data loss or duplication.