diff --git a/deploy/kubernetes/production/database.yaml b/deploy/kubernetes/production/database.yaml index 4b17793..99e831e 100644 --- a/deploy/kubernetes/production/database.yaml +++ b/deploy/kubernetes/production/database.yaml @@ -119,7 +119,11 @@ spec: number: 1 dataDurability: preferred parameters: - archive_timeout: 60s + # A 16 MiB WAL segment every 60 seconds requires at least 2.24 Mbit/s + # of continuous cross-region throughput even while the database is idle. + # The certified Ningbo/Hong Kong path is below that floor, so keep the + # object-storage RPO within five minutes without starving sync replay. + archive_timeout: 5min max_connections: "200" shared_buffers: 512MB wal_compression: "on" diff --git a/docs/operations/k3s-ha-runbook.md b/docs/operations/k3s-ha-runbook.md index 882fa31..614c199 100644 --- a/docs/operations/k3s-ha-runbook.md +++ b/docs/operations/k3s-ha-runbook.md @@ -10,7 +10,7 @@ CloudNativePG;洛杉矶只作为 K3s server/etcd 仲裁节点,并带 [生产同构验收模式与高媒体压力测试](production-acceptance.md)。 - 健康双库:同步复制,RPO=0。 -- 单库降级:`dataDurability: preferred` 保持写入,`archive_timeout=60s`,灾难 RPO 目标不超过 5 分钟。 +- 单库降级:`dataDurability: preferred` 保持写入,`archive_timeout=5min`,灾难 RPO 目标不超过 5 分钟。生产 WAL 段为 16 MiB;禁止把该值降到 60 秒,否则仅空闲切段就要求跨地域链路持续承载至少 2.24 Mbit/s,会使同步副本在当前带宽下永久追不平。 - 数据库故障 RTO:不超过 5 分钟。 - 应用发布:香港验收后再滚动宁波,计划内零停机。 - 公网入口:双 NGINX 加人工 AliDNS 切换。接入带健康检查的 GTM 前,不宣称公网入口自动高可用。 diff --git a/tests/release/manual-release-test.sh b/tests/release/manual-release-test.sh index a4458ec..ef337a0 100755 --- a/tests/release/manual-release-test.sh +++ b/tests/release/manual-release-test.sh @@ -290,5 +290,10 @@ grep -Fq 'gateway_tasks' "$root/deploy/manual/easyai-ai-gateway-release" grep -Fq 'gateway_task_attempts' "$root/deploy/manual/easyai-ai-gateway-release" grep -Fq 'gateway_task_events' "$root/deploy/manual/easyai-ai-gateway-release" grep -Fq 'production_changed=false' "$root/scripts/publish-release-images.sh" +grep -Fq 'archive_timeout: 5min' "$root/deploy/kubernetes/production/database.yaml" +if grep -Fq 'archive_timeout: 60s' "$root/deploy/kubernetes/production/database.yaml"; then + echo 'production archive timeout would exceed the certified cross-region bandwidth floor' >&2 + exit 1 +fi echo 'manual_release_tests=PASS'