标签:lead amp 说明 theme 取数 javascrip .com 3.2 启动
基于复制我们可以保证tile38 server 的ha
version: "3"
services:
app:
image: tile38/tile38
ports:
- "9851:9851"
app2:
image: tile38/tile38
ports:
- "9852:9851"
benthos:
image: jeffail/benthos
volumes:
- "./conf/webhook.yaml:/benthos.yaml"
ports:
- "4195:4195"
docker-compose up -d
docker-compose exec app2 sh
我们打算让app 为leader
tile38-cli
127.0.0.1:9851> FOLLOW app 9851
{"ok":true,"elapsed":"3.217411ms"}
127.0.0.1:9851>
SET key1 obj1 POINT 33.1 -112.4
app2 获取数据
从下边的日志也可以看出直接在follower 添加数据是不允许的
SET key1 obj1 POINT 33.1 -112.4
(error) not the leader
127.0.0.1:9851> get key1 obj1
{"ok":true,"object":{"type":"Point","coordinates":[-112.4,33.1]},"elapsed":"7.939µs"}
https://tile38.com/topics/replication/
标签:lead amp 说明 theme 取数 javascrip .com 3.2 启动
原文地址:https://www.cnblogs.com/rongfengliang/p/10259098.html