@@ -62,23 +62,27 @@ services:
62
62
# it is written to at least M replicas (which are then considered in-sync
63
63
# and belong to the in-sync replica set, or ISR). In any other case, the
64
64
# write operation returns an error. Then:
65
- # 1. if just one replica out of the N (see default.replication.factor
66
- # below) that the channel data is written to becomes unavailable,
65
+ # 1. If up to M-N replicas -- out of the N (see default.replication.factor
66
+ # below) that the channel data is written to -- become unavailable,
67
67
# operations proceed normally.
68
- # 2. If N - M + 1 (or more) replicas become unavailable, Kafka cannot
69
- # maintain an ISR set of M, so it stops accepting writes. Reads work
70
- # without issues. The cluster becomes writeable again when M replicas get
71
- # in-sync.
68
+ # 2. If more replicas become unavailable, Kafka cannot maintain an ISR set
69
+ # of M, so it stops accepting writes. Reads work without issues. The
70
+ # channel becomes writeable again when M replicas get in-sync.
72
71
- KAFKA_MIN_INSYNC_REPLICAS=2
73
72
#
74
73
# default.replication.factor
75
- # Let the value of this setting be M. This means that:
76
- # 1. Each channel will have its data replicated to N brokers. These are
77
- # the candidates for the ISR set for a channel. As we've noted in the
74
+ # Let the value of this setting be N. A replication factor of N means that
75
+ # each channel will have its data replicated to N brokers. These are the
76
+ # candidates for the ISR set of a channel. As we noted in the
78
77
# min.insync.replicas section above, not all of these brokers have to be
79
- # available all the time. We choose a default.replication.factor of N so
80
- # as to have the largest possible candidate set for a channel's ISR.
81
- # 2. Channel creations cannot go forward if less than N brokers are up.
78
+ # available all the time. In this sample configuration we choose a
79
+ # default.replication.factor of K-1 (where K is the total number of brokers in
80
+ # our Kafka cluster) so as to have the largest possible candidate set for
81
+ # a channel's ISR. We explicitly avoid setting N equal to K because
82
+ # channel creations cannot go forward if less than N brokers are up. If N
83
+ # were set equal to K, a single broker going down would mean that we would
84
+ # not be able to create new channels, i.e. the crash fault tolerance of
85
+ # the ordering service would be non-existent.
82
86
- KAFKA_DEFAULT_REPLICATION_FACTOR=3
83
87
#
84
88
# zookeper.connect
0 commit comments