From e977c3fd794701c91edea9aa4b53193c86f87df0 Mon Sep 17 00:00:00 2001 From: Serdar Ozmen Date: Tue, 12 Mar 2024 18:17:30 +0300 Subject: [PATCH] Fixes DOCS-834 (#1054) Also improved the whole WAN replication content for consistency. --- docs/modules/wan/pages/advanced-features.adoc | 495 +++++++++--------- .../pages/configuring-for-map-and-cache.adoc | 87 +-- .../wan/pages/defining-wan-replication.adoc | 4 +- docs/modules/wan/pages/quick-start.adoc | 18 +- docs/modules/wan/pages/tuning.adoc | 485 ++++++++--------- 5 files changed, 556 insertions(+), 533 deletions(-) diff --git a/docs/modules/wan/pages/advanced-features.adoc b/docs/modules/wan/pages/advanced-features.adoc index a258f0b0b..3d176ce99 100644 --- a/docs/modules/wan/pages/advanced-features.adoc +++ b/docs/modules/wan/pages/advanced-features.adoc @@ -75,9 +75,25 @@ Assume that you have configured an IMap with a WAN replication configuration as [tabs] ==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication name: london-wan-rep + batch-publisher: + cluster-name: istanbul + map: + my-map: + wan-replication-ref: + london-wan-rep: + merge-policy: com.hazelcast.spi.merge.PassThroughMergePolicy +---- +-- + XML:: -+ --- ++ [source,xml] ---- @@ -95,22 +111,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication name: london-wan-rep - batch-publisher: - cluster-name: istanbul - map: - my-map: - wan-replication-ref: - london-wan-rep: - merge-policy: com.hazelcast.spi.merge.PassThroughMergePolicy ----- ==== Then, an example curl command to initiate the synchronization for "my-map" would be as follows: @@ -169,10 +169,24 @@ https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/config/WanS Here is a declarative example: [tabs] -==== +==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + wanReplicationScheme: + batch-publisher: + cluster-name: clusterName + sync: + consistency-check-strategy: MERKLE_TREES +---- +-- + XML:: -+ --- ++ [source,xml] ---- @@ -188,20 +202,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - wanReplicationScheme: - batch-publisher: - cluster-name: clusterName - sync: - consistency-check-strategy: MERKLE_TREES ----- ==== 2 - Bind that WAN synchronization configuration to the data structure (currently IMap): @@ -211,9 +211,22 @@ Here is a declarative example: [tabs] ==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + map: + myMap: + wan-replication-ref: + wanReplicationScheme: + ... +---- +-- + XML:: -+ --- ++ [source,xml] ---- @@ -226,29 +239,29 @@ XML:: ... ---- --- +==== +3 - Finally, configure the Merkle tree using the `merkle-tree` element which is contained +in the `map` configuration: + +[tabs] +==== YAML:: + +-- [source,yaml] ---- hazelcast: map: myMap: - wan-replication-ref: - wanReplicationScheme: - ... + merkle-tree: + enabled: true + depth: 5 ---- -==== - -3 - Finally, configure the Merkle tree using the `merkle-tree` element which is contained -in the `map` configuration: +-- -[tabs] -==== XML:: -+ --- ++ [source,xml] ---- @@ -261,32 +274,41 @@ XML:: ... ---- --- +==== + +You can programmatically configure it, too, using the +https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/config/MerkleTreeConfig.html[MerkleTreeConfig^] object. + +Here is the full declarative configuration example showing how to +enable Delta WAN Synchronization, bind it to a Hazelcast data structure (an IMap in this case) and specify its depth: +[tabs] +==== YAML:: + +-- [source,yaml] ---- hazelcast: map: myMap: + wan-replication-ref: + wanReplicationScheme: + ... merkle-tree: enabled: true - depth: 5 + depth: 10 + wan-replication: + wanReplicationScheme: + batch-publisher: + cluster-name: clusterName + sync: + consistency-check-strategy: MERKLE_TREES ---- -==== - -You can programmatically configure it, too, using the -https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/config/MerkleTreeConfig.html[MerkleTreeConfig^] object. - -Here is the full declarative configuration example showing how to -enable Delta WAN Synchronization, bind it to a Hazelcast data structure (an IMap in this case) and specify its depth: +-- -[tabs] -==== -XML:: -+ --- +XML:: ++ [source,xml] ---- @@ -311,28 +333,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - map: - myMap: - wan-replication-ref: - wanReplicationScheme: - ... - merkle-tree: - enabled: true - depth: 10 - wan-replication: - wanReplicationScheme: - batch-publisher: - cluster-name: clusterName - sync: - consistency-check-strategy: MERKLE_TREES ----- ==== Here, the element `consistency-check-strategy` sets the strategy for @@ -620,27 +620,9 @@ For instance, this is an example of an XML configuration to which you can dynami [tabs] ==== -XML:: -+ --- -[source,xml] ----- - - ... - - - - com.hazelcast.spi.merge.PassThroughMergePolicy - false - - - ... - ----- --- - YAML:: + +-- [source,yaml] ---- hazelcast: @@ -653,6 +635,24 @@ hazelcast: merge-policy: com.hazelcast.spi.merge.PassThroughMergePolicy republishing-enabled: false ---- +-- + +XML:: ++ +[source,xml] +---- + + ... + + + + com.hazelcast.spi.merge.PassThroughMergePolicy + false + + + ... + +---- ==== Note that the map has defined WAN replication but there is no target cluster yet. @@ -897,9 +897,24 @@ You can also configure it using the programmatic configuration. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + map: + testMap: + wan-replication-ref: + test: + filters: + - com.example.MyFilter + - com.example.MyFilter2 +---- +-- + +XML:: ++ [source,xml] ---- @@ -915,21 +930,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - map: - testMap: - wan-replication-ref: - test: - filters: - - com.example.MyFilter - - com.example.MyFilter2 ----- ==== As shown in the above configuration, you can define more than one filter. Filters are called in the order that they are introduced. @@ -955,9 +955,35 @@ Following is the configuration snippet where `replicatedMap` and `replicatedCach [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + custom-publisher: + publisher-id: myCustomPublisher + class-name: com.my.WanPublisher + properties: + prop1: val1 + prop2: val2 + map: + replicatedMap: + wan-replication-ref: + london-wan-rep: + ... + cache: + replicatedCache: + wan-replication-ref: + london-wan-rep: + ... +---- +-- + +XML:: ++ [source,xml] ---- @@ -985,32 +1011,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - custom-publisher: - publisher-id: myCustomPublisher - class-name: com.my.WanPublisher - properties: - prop1: val1 - prop2: val2 - map: - replicatedMap: - wan-replication-ref: - london-wan-rep: - ... - cache: - replicatedCache: - wan-replication-ref: - london-wan-rep: - ... ----- ==== The `custom-publisher` is used to configure a custom implementation of a WAN replication implementing @@ -1033,9 +1033,24 @@ Below is a configuration example for specifying a custom WAN replication consume [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + consumer: + class-name: com.my.WanConsumer + properties: + prop1: val1 + prop2: val2 +---- +-- + +XML:: ++ [source,xml] ---- @@ -1051,21 +1066,6 @@ XML:: ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - consumer: - class-name: com.my.WanConsumer - properties: - prop1: val1 - prop2: val2 ----- ==== The `consumer` is used to configure the implementation of the `com.hazelcast.wan.WanConsumer` interface @@ -1092,9 +1092,31 @@ are processed. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + consumer: + persist-wan-replicated-data: false + map: + replicatedMap: + wan-replication-ref: + london-wan-rep: + ... + cache: + replicatedCache: + wan-replication-ref: + london-wan-rep: + ... +---- +-- + +XML:: ++ [source,xml] ---- @@ -1118,28 +1140,7 @@ XML:: ... ---- --- -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - consumer: - persist-wan-replicated-data: false - map: - replicatedMap: - wan-replication-ref: - london-wan-rep: - ... - cache: - replicatedCache: - wan-replication-ref: - london-wan-rep: - ... ----- ==== In the configuration above, you can see that the WAN Replication configuration is again matched by WAN replication @@ -1180,9 +1181,37 @@ The following is the equivalent declarative configuration: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + advanced-network: + enabled: true + wan-endpoint-config: + endpoint-tokyo: + ssl: + enabled: true + factory-class-name: com.hazelcast.examples.MySSLContextFactory + properties: + endpoints: tokyo.example.com:11010 + wan-replication: + replicate-to-tokyo: + batch-publisher: + cluster-name: clusterB + target-endpoints: ... + endpoint: endpoint-tokyo + map: + customer: + wan-replication-ref: + replicate-to-tokyo: + merge-policy-class-name: ... +---- +-- + +XML:: ++ [source,xml] ---- @@ -1214,34 +1243,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - advanced-network: - enabled: true - wan-endpoint-config: - endpoint-tokyo: - ssl: - enabled: true - factory-class-name: com.hazelcast.examples.MySSLContextFactory - properties: - endpoints: tokyo.example.com:11010 - wan-replication: - replicate-to-tokyo: - batch-publisher: - cluster-name: clusterB - target-endpoints: ... - endpoint: endpoint-tokyo - map: - customer: - wan-replication-ref: - replicate-to-tokyo: - merge-policy-class-name: ... ----- ==== The `wan-endpoint-config` element contains the same sub-elements as the @@ -1263,31 +1264,9 @@ The following is the equivalent declarative configuration: [tabs] ==== -XML:: -+ --- -[source,xml] ----- - - ... - - - 11010 - - com.hazelcast.examples.MySSLContextFactory - - bar - - - - - ... - ----- --- - YAML:: + +-- [source,yaml] ---- hazelcast: @@ -1304,5 +1283,27 @@ hazelcast: properties: foo: bar ---- +-- + +XML:: ++ +[source,xml] +---- + + ... + + + 11010 + + com.hazelcast.examples.MySSLContextFactory + + bar + + + + + ... + +---- ==== diff --git a/docs/modules/wan/pages/configuring-for-map-and-cache.adoc b/docs/modules/wan/pages/configuring-for-map-and-cache.adoc index 9f34d0b79..e5a041025 100644 --- a/docs/modules/wan/pages/configuring-for-map-and-cache.adoc +++ b/docs/modules/wan/pages/configuring-for-map-and-cache.adoc @@ -17,9 +17,26 @@ the map configuration as shown below. [tabs] ==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + ... + map: + my-shared-map: + wan-replication-ref: + london-wan-rep: + merge-policy: PassThroughMergePolicy + republishing-enabled: false +---- +-- + XML:: + --- [source,xml] ---- @@ -36,31 +53,14 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - ... - map: - my-shared-map: - wan-replication-ref: - london-wan-rep: - merge-policy: PassThroughMergePolicy - republishing-enabled: false ----- -==== - -The following is the equivalent programmatic configuration: +Java Member API:: ++ [source,java] ---- include::ROOT:example$/wan/EnablingWRforMap.java[tag=wrmap] ---- +==== You see that we have `my-shared-map` configured to replicate itself to the cluster targets defined in the earlier `wan-replication` element. @@ -108,13 +108,30 @@ for that map or cache, the default configuration will apply on the target cluste **Enabling WAN Replication for `ICache`:** -The following is a declarative configuration example for enabling WAN Replication for `ICache`: +The following is a configuration example for enabling WAN Replication for `ICache`: [tabs] ==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + ... + cache: + my-shared-cache: + wan-replication-ref: + london-wan-rep: + merge-policy: PassThroughMergePolicy + republishing-enabled: true +---- +-- + XML:: + --- [source,xml] ---- @@ -131,31 +148,15 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - ... - cache: - my-shared-cache: - wan-replication-ref: - london-wan-rep: - merge-policy: PassThroughMergePolicy - republishing-enabled: true ----- -==== - -The following is the equivalent programmatic configuration: +Java Member API:: ++ [source,java] ---- include::ROOT:example$/wan/EnablingWRforCache.java[tag=wrcache] ---- +==== + NOTE: Caches that are created dynamically do not support WAN replication functionality. Cache configurations should be defined either declaratively (by XML/YAML) or programmatically on both diff --git a/docs/modules/wan/pages/defining-wan-replication.adoc b/docs/modules/wan/pages/defining-wan-replication.adoc index 1ba60bae2..fb510efc6 100644 --- a/docs/modules/wan/pages/defining-wan-replication.adoc +++ b/docs/modules/wan/pages/defining-wan-replication.adoc @@ -110,7 +110,7 @@ hazelcast: ---- -- -Java:: +Java Member API:: + [source,java] ---- @@ -234,7 +234,7 @@ hazelcast: ---- -- -Java:: +Java Member API:: + [source,java] ---- diff --git a/docs/modules/wan/pages/quick-start.adoc b/docs/modules/wan/pages/quick-start.adoc index eb219aca5..6e0488ad4 100644 --- a/docs/modules/wan/pages/quick-start.adoc +++ b/docs/modules/wan/pages/quick-start.adoc @@ -57,7 +57,7 @@ hazelcast: ---- -- -Java:: +Java Member API:: + [source,java] ---- @@ -140,7 +140,7 @@ hazelcast: ---- -- -Java:: +Java Member API:: + [source,java] ---- @@ -194,7 +194,7 @@ hazelcast: ---- -- -Java:: +Java Member API:: + [source,java] ---- @@ -204,10 +204,14 @@ include::ROOT:example$/wan/MinimalActiveActiveConfiguration2.java[tag=wrc] 3 - Start your clusters to start using Active-Active WAN Replication. -Notice the `cluster-name` configuration element (not the one under the `batch-publisher` element, but -the one under the `hazelcast` element). -These are the names specifying the Hazelcast members' clusters on their locals. So, the name -of the cluster in one location should be mentioned on the cluster in the other location, as shown above. +Notice the `cluster-name` configuration element (not the one under the `batch-publisher` element, +but the one under the `hazelcast` element); this defines the name of the local Hazelcast cluster. +The `cluster-name` defined under the `batch-publisher` element will need to match the name of the remote target cluster, as shown above. + +IMPORTANT: When WAN replication is enabled between clusters where all members share the same `cluster-name`, +WAN event republishing (forwarding) will not be functional. +This is because WAN events can only be actioned once for each cluster, and this is tracked by recording +the name of each cluster the event passes through. This mechanism prevents an infinite loop of republishing scenario. As in the Active-Passive example shown in the previous section, this example configuration also uses a static endpoint to specify the target cluster member. diff --git a/docs/modules/wan/pages/tuning.adoc b/docs/modules/wan/pages/tuning.adoc index c5b148aaa..64b5f9ab5 100644 --- a/docs/modules/wan/pages/tuning.adoc +++ b/docs/modules/wan/pages/tuning.adoc @@ -16,9 +16,23 @@ Below is the configuration for changing the value of the element: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + batch-size: 1000 +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -34,20 +48,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - batch-size: 1000 ----- --- - Java:: + [source,java] @@ -73,9 +73,23 @@ You can change this element using the configuration as shown below. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + batch-max-delay-millis: 2000 +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -91,20 +105,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - batch-max-delay-millis: 2000 ----- --- - Java:: + [source,java] @@ -131,9 +131,23 @@ Below is an example configuration: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + response-timeout-millis: 5000 +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -149,20 +163,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - response-timeout-millis: 5000 ----- --- - Java:: + [source,java] @@ -189,9 +189,23 @@ You can change this element using the configuration as shown below. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + queue-capacity: 15000 +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -207,20 +221,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - queue-capacity: 15000 ----- --- - Java:: + [source,java] @@ -274,9 +274,23 @@ The following is an example configuration: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + queue-full-behavior: DISCARD_AFTER_MUTATION +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -292,20 +306,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - queue-full-behavior: DISCARD_AFTER_MUTATION ----- --- - Java:: + [source,java] @@ -335,9 +335,23 @@ The following is an example configuration: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + acknowledge-type: ACK_ON_OPERATION_COMPLETE +---- +-- + +XML:: ++ +-- [source,xml] ---- @@ -353,20 +367,6 @@ XML:: ---- -- -YAML:: -+ --- -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - acknowledge-type: ACK_ON_OPERATION_COMPLETE ----- --- - Java:: + [source,java] @@ -392,9 +392,22 @@ The following is an example configuration: [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + snapshot-enabled: true +---- +-- + +XML:: ++ [source,xml] ---- @@ -408,19 +421,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - snapshot-enabled: true ----- ==== NOTE: `snapshot-enabled` is optional. Its default value is `false`. @@ -465,9 +465,25 @@ An example WAN replication configuration using the default values of the above e [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + cluster-name: london + batch-size: 500 + batch-max-delay-millis: 1000 + idle-min-park-ns: 10000000 + idle-max-park-ns: 250000000 +---- +-- + +XML:: ++ [source,xml] ---- @@ -485,22 +501,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - cluster-name: london - batch-size: 500 - batch-max-delay-millis: 1000 - idle-min-park-ns: 10000000 - idle-max-park-ns: 250000000 ----- ==== We will now discuss tuning these elements. Unfortunately, the exact tuning parameters heavily depend @@ -540,9 +540,21 @@ for more information about the configuration options of the executor. [tabs] ==== -XML:: +YAML:: + -- +[source,yaml] +---- +hazelcast: + executor-service: + hz-wan: + pool-size: 16 +---- +-- + +XML:: ++ + [source,xml] ---- @@ -553,17 +565,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - executor-service: - hz-wan: - pool-size: 16 ----- ==== In this case, WAN replication is limited to use 16 threads at most, which is the default. Note that every configured WAN @@ -620,9 +621,22 @@ the aforementioned elements is shown below. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep-batch: + cluster-name: london + acknowledge-type: ACK_ON_OPERATION_COMPLETE + max-concurrent-invocations: -1 +---- +-- + +XML:: ++ [source,xml] ---- @@ -638,19 +652,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep-batch: - cluster-name: london - acknowledge-type: ACK_ON_OPERATION_COMPLETE - max-concurrent-invocations: -1 ----- ==== Finally, as we've mentioned, the exact values which will give you the optimal performance depend on your environment and use case. @@ -662,6 +663,21 @@ When using WAN Replication with Discovery SPI, you can set the period in seconds discover new target endpoints and reestablish connections to failed endpoints using the `discovery-period-seconds` property. The default value is 10 seconds. +[tabs] +==== +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep-batch: + cluster-name: london + discovery-period-seconds: 20 +---- +-- + [source,xml] ---- @@ -676,6 +692,7 @@ property. The default value is 10 seconds. ... ---- +==== == Maximum Number of Target Endpoints @@ -685,9 +702,22 @@ are defined using `target-endpoints`. Default is `Integer.MAX_VALUE`. [tabs] ==== -XML:: -+ --- +YAML:: ++ +-- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep-batch: + batch-publisher: + cluster-name: london + max-target-endpoints: 5 +---- +-- + +XML:: ++ [source,xml] ---- @@ -702,10 +732,19 @@ XML:: ... ---- --- +==== + +== Use Endpoint Private Address + +When using WAN Replication with Discovery SPI, you can set whether the WAN connection manager should connect to the +endpoint on the private address returned by the Discovery SPI using the `use-endpoint-private-address` property. +By default, this element is `false` which means the WAN connection manager always uses the public address. +[tabs] +==== YAML:: + +-- [source,yaml] ---- hazelcast: @@ -713,21 +752,12 @@ hazelcast: london-wan-rep-batch: batch-publisher: cluster-name: london - max-target-endpoints: 5 + use-endpoint-private-address: true ---- -==== - -== Use Endpoint Private Address - -When using WAN Replication with Discovery SPI, you can set whether the WAN connection manager should connect to the -endpoint on the private address returned by the Discovery SPI using the `use-endpoint-private-address` property. -By default, this element is `false` which means the WAN connection manager always uses the public address. +-- -[tabs] -==== -XML:: -+ --- +XML:: ++ [source,xml] ---- @@ -742,19 +772,6 @@ XML:: ... ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep-batch: - batch-publisher: - cluster-name: london - use-endpoint-private-address: true ----- ==== == Replicating `IMap`/`ICache` Evictions @@ -773,24 +790,9 @@ important to note that this **does not guarantee full data consistency**. You ca [tabs] ==== -XML:: -+ --- -[source,xml] ----- - - ... - - true - true - - ... - ----- --- - YAML:: + +-- [source,yaml] ---- hazelcast: @@ -800,6 +802,21 @@ hazelcast: hazelcast.wan.replicate.icache.evictions: true ... ---- +-- + +XML:: ++ +[source,xml] +---- + + ... + + true + true + + ... + +---- ==== You can find the specifications of these properties in xref:ROOT:system-properties.adoc[System Properties]. @@ -809,9 +826,31 @@ The default behavior for the static endpoint discovery strategy is to perform he [tabs] ==== -XML:: +YAML:: + -- +[source,yaml] +---- +hazelcast: + wan-replication: + london-wan-rep: + batch-publisher: + londonID: + cluster-name: london + target-endpoints: 10.3.5.1:5701, 10.3.5.2:5701 + properties: + health-check-interval-ms: 10000 <1> + health-check-timeout-ms: 3000 <2> + health-check-max-failed-probes: 10 <3> + health-check-eager-first-check: false <4> + health-check-initial-delay-ms: 1000 <5> + health-check-back-off-delay-step-ms: 5000 <6> + health-check-back-off-max-steps: 12 <7> +---- +-- + +XML:: ++ [source,xml] ---- @@ -833,28 +872,6 @@ XML:: ---- --- - -YAML:: -+ -[source,yaml] ----- -hazelcast: - wan-replication: - london-wan-rep: - batch-publisher: - londonID: - cluster-name: london - target-endpoints: 10.3.5.1:5701, 10.3.5.2:5701 - properties: - health-check-interval-ms: 10000 <1> - health-check-timeout-ms: 3000 <2> - health-check-max-failed-probes: 10 <3> - health-check-eager-first-check: false <4> - health-check-initial-delay-ms: 1000 <5> - health-check-back-off-delay-step-ms: 5000 <6> - health-check-back-off-max-steps: 12 <7> ----- ==== <1> Defines the interval between the connection health check tasks, in milliseconds. Health checks attempt connections, and each connection attempt can take up to ten seconds to timeout.