docs: restructure Rust backend rewrite plan with optimized architecture #2

Closed
aibo wants to merge 1 commits from LaPaoPao/BoosAPI:optimize/rust-backend-plan into refactor/rust-backend
Collaborator

Summary

基于对原始方案的深度分析重构 Rust backend rewrite 计划,核心改进:

  • 新增 Node.js 单线程瓶颈分析 — 量化事件循环在 SSE/JSON/协议转换场景下的劣化,作为迁移动因
  • 新增熔断器 + 速率限制 + Prometheus 可观测性 — 填补原方案缺失的基础设施
  • 数据库迁移拆分 — 32 张表一次迁移 → 4 次增量迁移 + 回滚脚本
  • API 兼容性验证框架 — Phase 0 录制 Node.js 快照 + CI 对比测试
  • 修正并行策略 — 7 条工作流按真实依赖关系分阶段启动
  • 14 周执行时间线 — 明确各阶段交付物
  • 4 步灰度发布策略 — 10% → 50% → 100% 渐进切流
  • 统一 API Key 哈希为 argon2id — 移除 Blake3 避免维护两套哈希

Key Changes

变更项 原始方案 优化方案
迁移策略 1 次 32 张表 4 次增量迁移 + 回滚脚本
API 兼容验证 无保障机制 Phase 0 录制 + CI 对比测试
熔断器 无 per-provider 独立熔断
速率限制 无 tower::limit + governor
可观测性 tracing 日志 + Prometheus metrics + /healthz 深度检查
并行策略 7 流同时启动 按真实依赖分阶段启动
灰度发布 无 4 步渐进切流
## Summary 基于对原始方案的深度分析重构 Rust backend rewrite 计划,核心改进: - **新增 Node.js 单线程瓶颈分析** — 量化事件循环在 SSE/JSON/协议转换场景下的劣化,作为迁移动因 - **新增熔断器 + 速率限制 + Prometheus 可观测性** — 填补原方案缺失的基础设施 - **数据库迁移拆分** — 32 张表一次迁移 → 4 次增量迁移 + 回滚脚本 - **API 兼容性验证框架** — Phase 0 录制 Node.js 快照 + CI 对比测试 - **修正并行策略** — 7 条工作流按真实依赖关系分阶段启动 - **14 周执行时间线** — 明确各阶段交付物 - **4 步灰度发布策略** — 10% → 50% → 100% 渐进切流 - **统一 API Key 哈希为 argon2id** — 移除 Blake3 避免维护两套哈希 ## Key Changes | 变更项 | 原始方案 | 优化方案 | |--------|---------|----------| | 迁移策略 | 1 次 32 张表 | 4 次增量迁移 + 回滚脚本 | | API 兼容验证 | 无保障机制 | Phase 0 录制 + CI 对比测试 | | 熔断器 | 无 | per-provider 独立熔断 | | 速率限制 | 无 | tower::limit + governor | | 可观测性 | tracing 日志 | + Prometheus metrics + /healthz 深度检查 | | 并行策略 | 7 流同时启动 | 按真实依赖分阶段启动 | | 灰度发布 | 无 | 4 步渐进切流 |
aibo added 1 commit 2026-05-16 04:53:39 +00:00
- Add Node.js single-threaded bottleneck analysis as core motivation
- Add circuit breaker, rate limiting, and Prometheus observability
- Split 32-table migration into 4 incremental migrations with rollbacks
- Add API compatibility verification framework (record/replay)
- Fix parallel workstream dependency graph (7 streams → staged)
- Add 4-step canary release strategy
- Unify API key hashing to argon2id
- Add 14-week execution timeline
boos closed this pull request 2026-05-16 08:25:08 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: boos/BoosAPI#2