Skip to content

Commit af085ab

Browse files
committed
added the maxwellHA on zookeeper document
1 parent 1b877f5 commit af085ab

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/docs/high_availability.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,36 @@ which can be worked around by forcing the JVM onto an ipv4 stack:
5353
JAVA_OPTS="-Djava.net.preferIPv4Stack=true" bin/maxwell --ha --raft_member_id=B
5454
```
5555

56+
# High Availabilty on Zookeeper
5657

58+
High availability through zookeeper
5759

60+
## Getting started
61+
Prepare two or more servers to serve as the maxwell host server and a zookeeper cluster. (The maxwell host server and a zookeeper cluster can communicate.)
62+
63+
Example Running Scripts:
5864

65+
```
66+
bin/maxwell --log_level='INFO' --user='<user>' --password='<passwd>' --host='<host>' --producer=stdout --client_id='<client_id>' --ha=true --zookeeper_server ='<host1:port>,<host2:port>,<host3:port>' --ha_modality='zookeeper'
67+
```
5968

69+
Run the preceding command on each maxwell host.
70+
71+
Get which host is the leader script Example:
72+
```
73+
bin/maxwell-leaders --ha=true --ha_modality='zookeeper' --zookeeper_server ='<host1:port>,<host2:port>,<host3:port>' --client_id='<client_id>'
74+
```
75+
You can get:
76+
```
77+
[INFO] MaxwellLeaders: clientID:<clientID>:leaders now are -> <leader host>
78+
```
79+
80+
## Getting deeper
81+
If a timeout error occurs between the maxwell host and the zookeeper cluster or the connection is abnormal due to network instability, you can set the following parameters:
82+
```
83+
--session_time_out_ms=<session timeout duration>
84+
--connection_time_out_ms=<internal default wait time for the client to establish a connection with the zk>
85+
--max_retries=<number of retries>
86+
--base_sleep_time_ms=<retry time interval>
87+
```
6088

0 commit comments

Comments
 (0)