release-manager

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Release Manager

发布管理器

Ship features safely with progressive rollouts.
通过渐进式发布安全交付功能。

Progressive Rollout Strategy

渐进式发布策略

yaml
Phase 1 - Internal (Day 1):
  - 100% to internal team
  - Test thoroughly
  - Fix critical bugs

Phase 2 - Beta (Day 2-3):
  - 5% to beta users
  - Monitor errors/performance
  - Collect feedback

Phase 3 - Gradual (Day 4-7):
  - 25% of users
  - Watch metrics closely
  - 50% of users if good
  - 100% if still good

Phase 4 - Full Release:
  - 100% of users
  - Remove feature flag
  - Announce publicly
yaml
Phase 1 - Internal (Day 1):
  - 100% to internal team
  - Test thoroughly
  - Fix critical bugs

Phase 2 - Beta (Day 2-3):
  - 5% to beta users
  - Monitor errors/performance
  - Collect feedback

Phase 3 - Gradual (Day 4-7):
  - 25% of users
  - Watch metrics closely
  - 50% of users if good
  - 100% if still good

Phase 4 - Full Release:
  - 100% of users
  - Remove feature flag
  - Announce publicly

Feature Flags

功能标志(Feature Flags)

typescript
// Feature flag implementation
const featureFlags = {
  newDashboard: {
    enabled: true,
    rollout: 0.25, // 25% of users
    userGroups: ['beta-testers'], // Always on for beta
  }
}

function isFeatureEnabled(feature, user) {
  const flag = featureFlags[feature]

  // Check user group
  if (user.groups.some(g => flag.userGroups.includes(g))) {
    return true
  }

  // Check rollout percentage
  const hash = hashUserId(user.id)
  return (hash % 100) < (flag.rollout * 100)
}

// Usage
{isFeatureEnabled('newDashboard', user) ? (
  <NewDashboard />
) : (
  <OldDashboard />
)}
typescript
// Feature flag implementation
const featureFlags = {
  newDashboard: {
    enabled: true,
    rollout: 0.25, // 25% of users
    userGroups: ['beta-testers'], // Always on for beta
  }
}

function isFeatureEnabled(feature, user) {
  const flag = featureFlags[feature]

  // Check user group
  if (user.groups.some(g => flag.userGroups.includes(g))) {
    return true
  }

  // Check rollout percentage
  const hash = hashUserId(user.id)
  return (hash % 100) < (flag.rollout * 100)
}

// Usage
{isFeatureEnabled('newDashboard', user) ? (
  <NewDashboard />
) : (
  <OldDashboard />
)}

Deployment Strategies

部署策略

Blue-Green Deployment

蓝绿部署(Blue-Green Deployment)

yaml
Process: 1. Deploy to "green" environment
  2. Test green thoroughly
  3. Switch traffic to green
  4. Keep blue as rollback

Pros: Instant rollback
Cons: 2x infrastructure cost
yaml
Process: 1. Deploy to "green" environment
  2. Test green thoroughly
  3. Switch traffic to green
  4. Keep blue as rollback

Pros: Instant rollback
Cons: 2x infrastructure cost

Canary Deployment

金丝雀部署(Canary Deployment)

yaml
Process: 1. Deploy to 5% of servers
  2. Monitor for 1 hour
  3. If good, deploy to 25%
  4. Monitor for 1 hour
  5. If good, deploy to 100%

Pros: Gradual, safe
Cons: Slower rollout
yaml
Process: 1. Deploy to 5% of servers
  2. Monitor for 1 hour
  3. If good, deploy to 25%
  4. Monitor for 1 hour
  5. If good, deploy to 100%

Pros: Gradual, safe
Cons: Slower rollout

Rollback Plan

回滚计划

yaml
Criteria for Rollback:
  - Error rate > 1%
  - Performance degradation > 20%
  - Critical bug discovered
  - Negative user feedback

Rollback Process: 1. Disable feature flag immediately
  2. Notify team
  3. Investigate issue
  4. Fix and redeploy
yaml
Criteria for Rollback:
  - Error rate > 1%
  - Performance degradation > 20%
  - Critical bug discovered
  - Negative user feedback

Rollback Process: 1. Disable feature flag immediately
  2. Notify team
  3. Investigate issue
  4. Fix and redeploy

Release Checklist

发布检查清单

Pre-Release

发布前

  • Code reviewed
  • Tests passing
  • Staging tested
  • Feature flag configured
  • Rollback plan ready
  • Monitoring alerts set
  • 代码已评审
  • 测试已通过
  • 预发布环境已测试
  • 功能标志已配置
  • 回滚计划已准备
  • 监控告警已设置

During Release

发布中

  • Deploy to 5% first
  • Watch error rate
  • Monitor performance
  • Check user feedback
  • Gradually increase
  • 先部署到5%用户/服务器
  • 关注错误率
  • 监控性能
  • 查看用户反馈
  • 逐步扩大范围

Post-Release

发布后

  • Monitor for 24 hours
  • Collect feedback
  • Remove feature flag
  • Document learnings
  • 监控24小时
  • 收集反馈
  • 移除功能标志
  • 记录经验总结

Monitoring

监控

yaml
Key Metrics During Release:
  - Error rate
  - Response time p95
  - CPU/memory usage
  - User-reported issues

Alerts:
  - Error rate > 1% → Pause rollout
  - Response time > 2s → Investigate
  - Memory spike > 90% → Rollback
yaml
Key Metrics During Release:
  - Error rate
  - Response time p95
  - CPU/memory usage
  - User-reported issues

Alerts:
  - Error rate > 1% → Pause rollout
  - Response time > 2s → Investigate
  - Memory spike > 90% → Rollback

Communication

沟通

yaml
Internal:
  - Slack announcement
  - Deploy log updated
  - Engineering team notified

External:
  - Changelog updated
  - Email to power users (if major)
  - Blog post (if significant)
yaml
Internal:
  - Slack announcement
  - Deploy log updated
  - Engineering team notified

External:
  - Changelog updated
  - Email to power users (if major)
  - Blog post (if significant)

Summary

总结

Safe releases:
  • ✅ Start small (5%)
  • ✅ Monitor closely
  • ✅ Rollback readily
  • ✅ Feature flags everywhere
  • ✅ Document process
安全发布要点:
  • ✅ 从小范围开始(5%)
  • ✅ 密切监控
  • ✅ 随时准备回滚
  • ✅ 全面使用功能标志
  • ✅ 记录流程