feat: 初始化零工后端代码

This commit is contained in:
Daniel
2026-04-01 14:19:25 +08:00
parent c6fabe262c
commit 84f8be7c0e
41 changed files with 2813 additions and 147 deletions

19
gig-poc/docs/SCALING.md Normal file
View File

@@ -0,0 +1,19 @@
# 扩容与高 DAU 策略
## 当前能力
- API/Web 提供 K8s 多副本与 HPA 模板:`infrastructure/k8s`
- Redis 缓存后端支持:热点匹配与查询链路缓存
- 异步队列:入库与匹配都支持异步削峰
- 观测接口:`/poc/ops/system/metrics``/poc/ops/ai/metrics`
## 推荐上线形态
1. API 多副本(>=3+ HPA3~20
2. Web 多副本(>=2+ HPA2~10
3. Redis 独立高可用(哨兵或托管)
4. PostgreSQL、Qdrant 使用托管或主从/集群
5. 异步接口承接高峰写流量与匹配重算
## 发布前门槛
- 运行 `sh infrastructure/scripts/load-baseline.sh`
- 更新并提交 `docs/CAPACITY_BASELINE.md`
- 验证 P95/P99、成功率和队列积压指标