feat: stabilize multi-region runtime sync and worker orchestration
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
WORKER_MODE=linux-systemd
|
||||
QT_QPA_PLATFORM=offscreen
|
||||
|
||||
# 单实例控制节点参考。若同一台大陆大机需要起多个 Worker 进程,
|
||||
# 请改用 domaincheck-worker.instance.env.example + domain-worker@.service。
|
||||
NODE_CODE=mainland-controller-01
|
||||
NODE_REGION=mainland
|
||||
NODE_ROLE=control
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
WORKER_MODE=linux-systemd
|
||||
QT_QPA_PLATFORM=offscreen
|
||||
|
||||
# 对应 systemd 模板:
|
||||
# cp domaincheck-worker.instance.env.example /etc/default/domaincheck-worker-a
|
||||
# cp domain-api/deploy/systemd/domain-worker@.service /etc/systemd/system/domaincheck-worker@.service
|
||||
# systemctl daemon-reload
|
||||
# systemctl enable --now domaincheck-worker@a
|
||||
#
|
||||
# 同一台机器上起多个 worker 实例时,每个实例必须使用不同的 NODE_CODE,
|
||||
# 否则运行态、控制指令和集群心跳会互相覆盖。
|
||||
NODE_CODE=mainland-controller-01-a
|
||||
WORKER_PARENT_NODE_CODE=mainland-controller-01
|
||||
NODE_REGION=mainland
|
||||
NODE_ROLE=control
|
||||
|
||||
# DB
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_PORT=5432
|
||||
# DB_DATABASE=domain
|
||||
# DB_USER=postgres
|
||||
# DB_PASSWORD=postgres
|
||||
|
||||
# REDIS
|
||||
# REDIS_HOST=127.0.0.1
|
||||
# REDIS_PORT=6379
|
||||
# REDIS_PASSWORD=
|
||||
# REDIS_DB=0
|
||||
|
||||
# SYNC
|
||||
SYNC_PUSH_ENABLED=true
|
||||
SYNC_SOURCE_REGION=mainland
|
||||
SYNC_TARGET_REGION=overseas
|
||||
SYNC_TARGET_API_BASE_URL=http://海外控制面IP:8100/api/v1
|
||||
SYNC_SHARED_TOKEN=
|
||||
SYNC_BATCH_SIZE=5000
|
||||
SYNC_POLL_INTERVAL_SECONDS=2
|
||||
|
||||
# 第一版建议每实例先用中等线程数压测,不要直接把单进程线程拉到极限。
|
||||
# THREAD_COUNT=1000
|
||||
Reference in New Issue
Block a user