技能 编程开发 Flexport生产部署检查清单

Flexport生产部署检查清单

v20260423
flexport-prod-checklist
这是一份用于Flexport物流集成生产环境部署的全面检查清单。它涵盖了部署前至上线的所有关键步骤,包括API认证配置、健壮的Webhook处理机制、数据完整性验证、监控告警设置,以及确保系统发生问题时的安全回滚流程。
获取技能
182 次下载
概览

Flexport Production Checklist

Overview

Pre-deployment and go-live checklist for Flexport logistics integrations covering API configuration, webhook setup, monitoring, and rollback procedures.

Pre-Deployment

Authentication & Secrets

  • [ ] Production API key stored in secret manager (not env files)
  • [ ] Webhook secret configured and verified
  • [ ] Key rotation procedure documented
  • [ ] No keys in git history (git log -p | grep -i flexport_api)

API Integration

  • [ ] All endpoints tested against production API
  • [ ] Pagination implemented for list endpoints (/shipments, /products)
  • [ ] Rate limit handling with exponential backoff
  • [ ] Retry logic for transient 5xx errors
  • [ ] Idempotency keys on POST/PATCH operations
  • [ ] Flexport-Version: 2 header on all requests

Webhooks

  • [ ] HTTPS endpoint with valid TLS certificate
  • [ ] X-Hub-Signature verification implemented
  • [ ] Webhook endpoint responds within 5 seconds
  • [ ] Dead letter queue for failed webhook processing
  • [ ] Idempotent webhook handlers (replay-safe)

Data Integrity

  • [ ] HS codes validated against customs requirements
  • [ ] UN/LOCODE port codes verified
  • [ ] Commercial invoice totals cross-checked
  • [ ] Product catalog synced with Flexport Product Library

Monitoring & Alerting

// Health check endpoint
app.get('/health', async (req, res) => {
  const start = Date.now();
  try {
    const r = await fetch('https://api.flexport.com/shipments?per=1', {
      headers: {
        'Authorization': `Bearer ${process.env.FLEXPORT_API_KEY}`,
        'Flexport-Version': '2',
      },
    });
    res.json({
      status: r.ok ? 'healthy' : 'degraded',
      flexport: { connected: r.ok, latencyMs: Date.now() - start },
    });
  } catch {
    res.status(503).json({ status: 'unhealthy', flexport: { connected: false } });
  }
});

Alert Thresholds

MetricWarningCritical
API error rate> 5%> 20%
p99 latency> 3000ms> 10000ms
429 rate limits> 5/hour> 20/hour
Webhook failures> 2/hour> 10/hour
Auth failures (401/403)AnyAny

Rollback Procedure

# Immediate rollback
kubectl rollout undo deployment/flexport-integration
# Or for non-k8s: revert to last known good image/version

Resources

Next Steps

For version upgrades, see flexport-upgrade-migration.

信息
分类 编程开发
名称 flexport-prod-checklist
版本 v20260423
大小 2.99KB
更新时间 2026-04-26
语言