Files
lislgosms/docs/phase-8-500tps-performance-report.md

47 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CMPP 平台第一版 500 条/秒压测报告
## 结论
阶段 8 验证中,BullMQ 链路 Spike 已超过 500 条/秒验收线。阶段 7 最近一次完整验证结果为:
- 消息数:15000
- 并发:500
- submit result15000
- receipt event15000
- 入队 TPS:约 6953.18
- 端到端 TPS:约 910.39
- 是否满足 500 条/秒:是
阶段 8 已通过 `npm run verify:phase8` 执行同一压测脚本,最终验证结果为:
- 消息数:15000
- 并发:500
- submit result15000
- receipt event15000
- 入队 TPS:约 4321.51
- 端到端 TPS:约 825.48
- 是否满足 500 条/秒:是
## 压测范围
本报告覆盖 NestJS 与 Gateway 队列契约的 Spike 链路:
1. NestJS 侧模拟提交 `SubmitCommand`
2. BullMQ 处理 submit result。
3. BullMQ 处理 receipt event。
4. 验证消息完整性和端到端吞吐。
## 不覆盖范围
1. 不连接真实运营商 CMPP 生产网关。
2. 不覆盖 PostgreSQL 大表写入真实 I/O 压测。
3. 不覆盖 MinIO 文件导入大文件吞吐。
## 上线前建议
1. 在 Linux 部署环境执行同一脚本,固定 Redis、PostgreSQL、API、Gateway 规格后记录基线。
2.`sms_message_record` 按日期或租户做分区规划。
3. 将发送明细、回执记录、操作日志的高频查询接入只读副本或统计表。
4. 将 Send Worker 按通道或队列分片横向扩容。
5. 将通道限速从单 Redis key 秒级计数升级为令牌桶或 Lua 原子脚本。