GemCode multi-site (MultiSite) synchronization experiment

GemCode multi-site (MultiSite) synchronization experiment

Preparation Phase

Prepare T1,T2,T3,T44 servers

T1=192.168.68.17
T2=192.168.68.18
T3=192.168.68.20
T4=192.168.68.21

Sender cluster: T1,T2
Receiver cluster: T3,T4
create /opt/geode_work/directory

Sender cluster: T1,T2

  • T1 enters the working directory cd /opt/geode_work/
    and executesgfsh
#启动locator1
start locator --name=locator1 --port=10334 --locators=T1[10334] \
--initial-heap=1G --max-heap=8G \
--J=-Dgemfire.max-num-reconnect-tries=100 --J=-Dgemfire.member-timeout=120000 \
--J=-Dgemfire.distributed-system-id=101 \
--J=-Dgemfire.remote-locators=T3[10334]

#启动server1
start server --name=server1 --locator-wait-time=120 --server-port=40401 --locators=T1[10334] \
--initial-heap=16G --max-heap=16G --J=-Xmn8g\
--J=-Dgemfire.max-num-reconnect-tries=100  --J=-Dgemfire.member-timeout=120000 \
--off-heap-memory-size=32G --lock-memory=true --critical-off-heap-percentage=90 --eviction-off-heap-percentage=80 \
--J=-Dgemfire.distributed-system-id=101 \
--J=-Dgemfire.remote-locators=T3[10334]

#等待server2启动后再执行
create gateway-sender --id=sender1 --enable-persistence=true --manual-start=false --parallel=true --remote-distributed-system-id=102
#然后执行:list gateways 来查看状态

#创建region1
create region --name=region1 --type=PARTITION_REDUNDANT_PERSISTENT --redundant-copies=1 --off-heap=true \
--enable-statistics=true --entry-time-to-live-expiration=600 --entry-time-to-live-expiration-action=destroy \
--gateway-sender-id=sender1


  • T2 enter the working directory cd /opt/geode_work/
    and executegfsh
#启动server2
start server --name=server2 --locator-wait-time=120 --server-port=40401 --locators=T1[10334] \
--initial-heap=16G --max-heap=16G --J=-Xmn8g\
--J=-Dgemfire.max-num-reconnect-tries=100  --J=-Dgemfire.member-timeout=120000 \
--off-heap-memory-size=32G --lock-memory=true --critical-off-heap-percentage=90 --eviction-off-heap-percentage=80 \
--J=-Dgemfire.distributed-system-id=101 \
--J=-Dgemfire.remote-locators=T3[10334]

Receiver cluster: T3, T4

Enter the working directory cd /opt/geode_work/
and executegfsh

  • T3
#启动locator3
start locator --name=locator3 --port=10334 --locators=T3[10334] \
--initial-heap=1G --max-heap=8G \
--J=-Dgemfire.max-num-reconnect-tries=100 --J=-Dgemfire.member-timeout=120000 \
--J=-Dgemfire.distributed-system-id=102

#启动server3
start server --name=server3 --locator-wait-time=120 --server-port=40401 --locators=T3[10334] \
--initial-heap=16G --max-heap=16G --J=-Xmn8g\
--J=-Dgemfire.max-num-reconnect-tries=100  --J=-Dgemfire.member-timeout=120000 \
--off-heap-memory-size=32G --lock-memory=true --critical-off-heap-percentage=90 --eviction-off-heap-percentage=80 \
--J=-Dgemfire.distributed-system-id=102

#等待server4启动后再执行
create gateway-receiver --start-port=1530 --end-port=1551
#然后执行:list gateways 来查看状态

#创建region1(要跟sender端的名字一样)
create region --name=region1 --type=PARTITION_REDUNDANT_PERSISTENT --redundant-copies=1 --off-heap=true \
--enable-statistics=true --entry-time-to-live-expiration=600 --entry-time-to-live-expiration-action=destroy


  • T4 enter the working directory cd /opt/geode_work/
    and executegfsh
#启动server4
start server --name=server4 --locator-wait-time=120 --server-port=40401 --locators=T3[10334] \
--initial-heap=16G --max-heap=16G --J=-Xmn8g\
--J=-Dgemfire.max-num-reconnect-tries=100  --J=-Dgemfire.member-timeout=120000 \
--off-heap-memory-size=32G --lock-memory=true --critical-off-heap-percentage=90 --eviction-off-heap-percentage=80 \
--J=-Dgemfire.distributed-system-id=102

appendix:

#web管理地址
http://192.168.68.17:7070/pulse/

#进入工作目录
cd /opt/geode_work

#查找geode进程
ps -ef | grep geode | grep -v grep

#连接到集群并执行多个命令
gfsh -e "connect" -e "list members"
gfsh -e "connect" -e "list gateways"

#在gfsh里执行停止集群命令
gfsh>shutdown --include-locators=true --time-out=60

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324472048&siteId=291194637