You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "tinaselenge (via GitHub)" <gi...@apache.org> on 2023/06/14 08:42:06 UTC

[GitHub] [kafka] tinaselenge commented on a diff in pull request #13650: KAFKA-14709: Move content in connect/mirror/README.md to the docs

tinaselenge commented on code in PR #13650:
URL: https://github.com/apache/kafka/pull/13650#discussion_r1229238520


##########
connect/mirror/README.md:
##########
@@ -1,297 +0,0 @@
-
-# MirrorMaker 2.0
-
-MM2 leverages the Connect framework to replicate topics between Kafka
-clusters. MM2 includes several new features, including:
-
- - both topics and consumer groups are replicated
- - topic configuration and ACLs are replicated
- - cross-cluster offsets are synchronized
- - partitioning is preserved
-
-## Replication flows
-
-MM2 replicates topics and consumer groups from upstream source clusters
-to downstream target clusters. These directional flows are notated
-`A->B`.
-
-It's possible to create complex replication topologies based on these
-`source->target` flows, including:
-
- - *fan-out*, e.g. `K->A, K->B, K->C`
- - *aggregation*, e.g. `A->K, B->K, C->K`
- - *active/active*, e.g. `A->B, B->A`
-
-Each replication flow can be configured independently, e.g. to replicate
-specific topics or groups:
-
-    A->B.topics = topic-1, topic-2
-    A->B.groups = group-1, group-2
-
-By default, all topics and consumer groups are replicated (except
-excluded ones), across all enabled replication flows. Each
-replication flow must be explicitly enabled to begin replication:
-
-    A->B.enabled = true
-    B->A.enabled = true
-
-## Starting an MM2 process
-
-You can run any number of MM2 processes as needed. Any MM2 processes
-which are configured to replicate the same Kafka clusters will find each
-other, share configuration, load balance, etc.
-
-To start an MM2 process, first specify Kafka cluster information in a
-configuration file as follows:
-
-    # mm2.properties
-    clusters = us-west, us-east
-    us-west.bootstrap.servers = host1:9092
-    us-east.bootstrap.servers = host2:9092
-
-You can list any number of clusters this way.
-
-Optionally, you can override default MirrorMaker properties:
-
-    topics = .*
-    groups = group1, group2
-    emit.checkpoints.interval.seconds = 10
-
-These will apply to all replication flows. You can also override default
-properties for specific clusters or replication flows:
-
-    # configure a specific cluster
-    us-west.offset.storage.topic = mm2-offsets
-
-    # configure a specific source->target replication flow
-    us-west->us-east.emit.heartbeats = false
-
-Next, enable individual replication flows as follows:
-
-    us-west->us-east.enabled = true     # disabled by default
-
-Finally, launch one or more MirrorMaker processes with the `connect-mirror-maker.sh`
-script:
-
-    $ ./bin/connect-mirror-maker.sh mm2.properties
-
-## Multicluster environments
-
-MM2 supports replication between multiple Kafka clusters, whether in the
-same data center or across multiple data centers. A single MM2 cluster
-can span multiple data centers, but it is recommended to keep MM2's producers
-as close as possible to their target clusters. To do so, specify a subset
-of clusters for each MM2 node as follows:
-
-    # in west DC:
-    $ ./bin/connect-mirror-maker.sh mm2.properties --clusters west-1 west-2
-
-This signals to the node that the given clusters are nearby, and prevents the
-node from sending records or configuration to clusters in other data centers.
-
-### Example
-
-Say there are three data centers (west, east, north) with two Kafka
-clusters in each data center (west-1, west-2 etc). We can configure MM2
-for active/active replication within each data center, as well as cross data
-center replication (XDCR) as follows:
-
-    # mm2.properties
-    clusters: west-1, west-2, east-1, east-2, north-1, north-2
-
-    west-1.bootstrap.servers = ...
-    ---%<---
-
-    # active/active in west
-    west-1->west-2.enabled = true
-    west-2->west-1.enabled = true
-
-    # active/active in east
-    east-1->east-2.enabled = true
-    east-2->east-1.enabled = true
-
-    # active/active in north
-    north-1->north-2.enabled = true
-    north-2->north-1.enabled = true
-
-    # XDCR via west-1, east-1, north-1
-    west-1->east-1.enabled = true
-    west-1->north-1.enabled = true
-    east-1->west-1.enabled = true
-    east-1->north-1.enabled = true
-    north-1->west-1.enabled = true
-    north-1->east-1.enabled = true
-
-Then, launch MM2 in each data center as follows:
-
-    # in west:
-    $ ./bin/connect-mirror-maker.sh mm2.properties --clusters west-1 west-2
-
-    # in east:
-    $ ./bin/connect-mirror-maker.sh mm2.properties --clusters east-1 east-2
-
-    # in north:
-    $ ./bin/connect-mirror-maker.sh mm2.properties --clusters north-1 north-2
-    
-With this configuration, records produced to any cluster will be replicated
-within the data center, as well as across to other data centers. By providing
-the `--clusters` parameter, we ensure that each node only produces records to
-nearby clusters.
-
-N.B. that the `--clusters` parameter is not technically required here. MM2 will work fine without it; however, throughput may suffer from "producer lag" between
-data centers, and you may incur unnecessary data transfer costs.
-
-## Configuration
-The following sections target for dedicated MM2 cluster. If running MM2 in a Connect cluster, please refer to [KIP-382: MirrorMaker 2.0](https://cwiki.apache.org/confluence/display/KAFKA/KIP-382%3A+MirrorMaker+2.0) for guidance.
- 
-### General Kafka Connect Config
-All Kafka Connect, Source Connector, Sink Connector configs, as defined in [Kafka official doc](https://kafka.apache.org/documentation/#connectconfigs), can be 
-directly used in MM2 configuration without prefix in the configuration name. As the starting point, most of these default configs may work well with the exception of `tasks.max`.
-
-In order to evenly distribute the workload across more than one MM2 instance, it is advised to set `tasks.max` at least to 2 or even larger depending on the hardware resources
-and the total number partitions to be replicated.
-
-### Kafka Connect Config for a Specific Connector
-If needed, Kafka Connect worker-level configs could be even specified "per connector", which needs to follow the format of `cluster_alias.config_name` in MM2 configuration. For example,
- 
-    backup.ssl.truststore.location = /usr/lib/jvm/zulu-8-amd64/jre/lib/security/cacerts // SSL cert location
-    backup.security.protocol = SSL // if target cluster needs SSL to send message
-    
-### MM2 Config for a Specific Connector
-MM2 itself has many configs to control how it behaves. To override those default values, add the config name by the format of `source_cluster_alias->target_cluster_alias.config_name` in MM2 configuration. For example,
-    
-    backup->primary.enabled = false // set to false if one-way replication is desired
-    primary->backup.topics.blacklist = topics_to_blacklist
-    primary->backup.emit.heartbeats.enabled = false
-    primary->backup.sync.group.offsets = true 
-
-### Producer / Consumer / Admin Config used by MM2
-In many cases, customized values for producer or consumer configurations are needed. In order to override the default values of producer or consumer used by MM2, 
-`target_cluster_alias.producer.producer_config_name`, `source_cluster_alias.consumer.consumer_config_name` or `cluster_alias.admin.admin_config_name` are the formats to use in MM2 configuration. For example,
-
-     backup.producer.compression.type = gzip
-     backup.producer.buffer.memory = 32768
-     primary.consumer.isolation.level = read_committed
-     primary.admin.bootstrap.servers = localhost:9092
-     
-### Shared configuration

Review Comment:
   I believe this is already included in the doc. https://github.com/apache/kafka/blob/f275ed812a71a02362f7c75c3fbde46c381cbe1a/docs/ops.html#L874 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org