Skip to content

Commit c3d6006

Browse files
authored
Cloud min replication factor (#840)
1 parent c1aa5b7 commit c3d6006

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed

modules/develop/pages/config-topics.adoc

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ Creating a topic can be as simple as specifying a name for your topic on the com
1515
rpk topic create xyz
1616
----
1717

18-
This command creates a topic named `xyz` with one partition and one replica, because these are the default values set in the cluster configuration file.
18+
ifndef::env-cloud[]
19+
This command creates a topic named `xyz` with one partition and one replica, because these are the default values set in the cluster configuration file. Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data.
20+
21+
endif::[]
22+
23+
ifdef::env-cloud[]
24+
This command creates a topic named `xyz` with one partition and three replicas, because these are the default values set in the cluster configuration file. Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data.
25+
26+
endif::[]
1927

2028
This section shows how to change default settings for a topic.
2129

@@ -35,9 +43,7 @@ rpk topic create xyz -p 10
3543
ifndef::env-cloud[]
3644
=== Choose the replication factor
3745

38-
Replicas are copies of partitions that are distributed across different brokers, so if one broker goes down, other brokers still have a copy of the data. The default replication factor in the cluster configuration is set to 1.
39-
40-
By choosing a replication factor greater than 1, you ensure that each partition has a copy of its data on at least one other broker. One replica acts as the leader, and the other replicas are followers.
46+
The default replication factor in the cluster configuration is set to 1. By choosing a replication factor greater than 1, you ensure that each partition has a copy of its data on at least one other broker. One replica acts as the leader, and the other replicas are followers.
4147

4248
To specify a replication factor of 3 for topic `xyz`, run:
4349

@@ -158,6 +164,7 @@ The `-c` flag limits the command output to just the topic configurations. This c
158164

159165
The following command output displays after running `rpk topic describe test-topic`, where `test-topic` was created with default settings:
160166

167+
ifndef::env-cloud[]
161168
[,bash]
162169
----
163170
rpk topic describe test_topic
@@ -196,6 +203,38 @@ PARTITIONS 3
196203
REPLICAS 3
197204
----
198205

206+
endif::[]
207+
208+
ifdef::env-cloud[]
209+
[,bash]
210+
----
211+
rpk topic describe test_topic
212+
SUMMARY
213+
=======
214+
NAME test_topic
215+
PARTITIONS 1
216+
REPLICAS 3
217+
218+
CONFIGS
219+
=======
220+
KEY VALUE SOURCE
221+
cleanup.policy delete DYNAMIC_TOPIC_CONFIG
222+
compression.type producer DEFAULT_CONFIG
223+
max.message.bytes 1048576 DEFAULT_CONFIG
224+
message.timestamp.type CreateTime DEFAULT_CONFIG
225+
redpanda.datapolicy function_name: script_name: DEFAULT_CONFIG
226+
redpanda.remote.delete true DEFAULT_CONFIG
227+
redpanda.remote.read false DEFAULT_CONFIG
228+
redpanda.remote.write false DEFAULT_CONFIG
229+
retention.bytes -1 DEFAULT_CONFIG
230+
retention.local.target.bytes -1 DEFAULT_CONFIG
231+
retention.local.target.ms 86400000 DEFAULT_CONFIG
232+
retention.ms 604800000 DEFAULT_CONFIG
233+
segment.bytes 1073741824 DEFAULT_CONFIG
234+
----
235+
236+
endif::[]
237+
199238
== Delete a topic
200239

201240
To delete a topic, run:

modules/reference/pages/properties/cluster-properties.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@ Default replication factor for new topics.
936936

937937
*Default:* `1`
938938

939+
NOTE: In Redpanda Cloud, all new topics are created with a replication factor of 3.
940+
939941
---
940942

941943
=== default_window_sec

modules/reference/pages/rpk/rpk-topic/rpk-topic-create.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ create topics.
3333
defaults to the cluster property `default_topic_partitions` (default `-1`).
3434

3535
|-r, --replicas |int16 |Replication factor (must be odd); -1 defaults to
36-
the cluster's default_topic_replications (default -1).
36+
the cluster's default_topic_replications (default -1). In Redpanda Cloud, the replication factor is set to 3.
3737

3838
|-c, --topic-config |string (repeatable) |Topic properties can be set by using `<key>=<value>`. For example `-c cleanup.policy=compact`. This flag is repeatable, so you can set multiple parameters in a single command.
3939

0 commit comments

Comments
 (0)