[Eval][v2][zh] Regional 5xx spike after DNS TTL change
service: api-gatewaycreated: 6/2/2026, 11:40:13 PM
Raw incident context
Time: 22:10 UTC. api-gateway in us-west-2 returning HTTP 502 for ~35% of requests. us-east-1 unaffected. Symptoms (us-west-2 only): - 502 rate: 35% (baseline 0.05%) - p99 latency: 4s (mostly DNS resolution timeouts in error trace) - nginx upstream errors: "upstream timed out (110: Connection timed out) while connecting to upstream" Recent changes: - 21:40 UTC — DNS team changed TTL for internal-services.example.com from 300s → 30s as part of a planned migration - Also changed CNAME target: internal-services.example.com now points to a NEW NLB (was pointing to a legacy ALB) - Old ALB still up and answering, but its DNS records were not removed - New NLB was created in us-east-1 only — no us-west-2 record exists Logs: - nginx in us-west-2 trying to resolve internal-services.example.com → getting NXDOMAIN or stale IPs - ~30% of pods have cached the old ALB IP and are working; rest are failing - us-east-1 pods all resolve correctly to the new NLB On-call: - 22:08 — pager - 22:11 — DNS team confirms the planned change - 22:12 — debate: revert DNS or hot-patch us-west-2 to point at us-east-1 NLB
Summary
api-gateway 在 us-west-2 区域出现 35% 的 502 错误和 p99 4s 延迟,原因是 DNS 团队在 21:40 UTC 将 internal-services.example.com 的 CNAME 指向了仅部署在 us-east-1 的新 NLB,导致 us-west-2 的 pod 无法解析到有效后端。
Severity reasoning: 用户可见故障,错误率 35% 远超 1%,且持续超过 5 分钟,符合 SEV1 标准。
deepseek-chat·prompt v2·output: zh·8538ms·2195↑ / 1460↓ tok·$0.00220
Root cause hypotheses
- highDNS 变更导致 us-west-2 的 pod 无法解析 internal-services.example.com 到有效 IP
Evidence: nginx 日志显示 'upstream timed out (110: Connection timed out) while connecting to upstream',且 us-west-2 的 DNS 解析返回 NXDOMAIN 或过期 IP。
- high新 NLB 仅部署在 us-east-1,us-west-2 无对应记录
Evidence: DNS 团队确认新 NLB 创建在 us-east-1,且 us-west-2 的 DNS 记录未更新。
- medium旧 ALB 的 DNS 记录未清理导致部分 pod 使用过期 IP
Evidence: 约 30% 的 pod 仍能正常工作,说明它们缓存了旧 ALB 的 IP。
- lowDNS TTL 从 300s 改为 30s 导致缓存不一致加剧
Evidence: TTL 降低后,更多 pod 快速获取到错误的 DNS 响应,但这不是根本原因。
Investigation checklist
- 检查 us-west-2 的 DNS 解析结果
kubectl exec -n prod -l app=api-gateway -- nslookup internal-services.example.com 2>&1 | head -20Expected: 应返回新 NLB 的 IP(us-east-1 的 IP),但实际可能返回 NXDOMAIN 或旧 ALB IP。
- 确认新 NLB 在 us-west-2 是否存在
aws elbv2 describe-load-balancers --region us-west-2 --names new-nlb-name 2>&1Expected: 返回 'LoadBalancerNotFound' 或类似错误,确认新 NLB 不在 us-west-2。
- 检查 us-west-2 的 nginx 错误日志
kubectl logs -n prod -l app=api-gateway --since=30m | grep -i 'upstream timed out' | head -20Expected: 大量 'upstream timed out' 错误,确认 DNS 解析超时。
- 验证 us-east-1 的 DNS 解析正常
kubectl exec -n prod -l app=api-gateway --region us-east-1 -- nslookup internal-services.example.com 2>&1 | head -20Expected: 返回新 NLB 的 IP,且无超时。
Mitigation plan
立即回滚 DNS 变更:将 internal-services.example.com 的 CNAME 指回旧 ALB
Risk: 旧 ALB 可能被计划下线,但当前仍可用;回滚后 us-west-2 恢复,但 us-east-1 会短暂切换到旧 ALB,可能影响性能。
Rollback: 重新应用新 DNS 记录(指向新 NLB),但需先确保 us-west-2 有新 NLB。
在 us-west-2 创建新 NLB,并将 DNS 记录指向它
Risk: 创建 NLB 需要 5-10 分钟,期间故障持续;需确保安全组和路由正确。
Rollback: 删除新创建的 NLB,并回滚 DNS 到旧 ALB。
Customer impact
us-west-2 区域约 35% 的用户请求返回 502 错误,页面加载缓慢(p99 4s)。影响范围限于该区域,预计影响用户数占总用户的 15-20%。
Postmortem draft
Summary
[FILL IN]
Timeline (UTC)
- 21:40 - DNS 团队变更 internal-services.example.com 的 CNAME 指向新 NLB(仅 us-east-1)
- 22:08 - 收到告警
- 22:10 - 确认 us-west-2 502 错误
- 22:11 - DNS 团队确认变更
- 22:12 - 讨论回滚方案
Impact
us-west-2 区域 35% 请求失败,p99 4s,持续约 30 分钟。
Root Cause
DNS 变更将 CNAME 指向仅部署在 us-east-1 的新 NLB,导致 us-west-2 无法解析。
Detection
告警系统在 22:08 触发,延迟约 28 分钟。
Response
[FILL IN]
What Went Well
[FILL IN]
What Went Poorly
[FILL IN]
Action Items
[FILL IN]
Follow-ups
- P0DNS 变更流程增加跨区域验证步骤— 平台团队
- P1增加 DNS 解析错误告警(NXDOMAIN 或超时)— 可观测性团队
- P1审查 DNS 变更的 TTL 策略,避免快速切换导致缓存不一致— DNS 团队
- P0确保新 NLB 在部署前在所有区域创建— 基础设施团队
Similar past incidents
lexical match (pg_trgm)
- 58%
[Eval][v1][zh] Regional 5xx spike after DNS TTL change
us-west-2 region: 35% 502 errors, p99 4s. us-east-1: normal. New DNS record deployed 30min before incident.
- 56%
[Eval][v2][zh] Regional 5xx spike after DNS TTL change
us-west-2 region: 35% 502 errors, p99 4s. us-east-1: normal. New DNS record deployed 30min before incident.
- 52%
[Eval][v2][en] Regional 5xx spike after DNS TTL change
us-west-2 region: 35% 502 errors, p99 4s. us-east-1: normal. New DNS record deployed 30min before incident.
- 50%
[Eval][v1][en] Regional 5xx spike after DNS TTL change
us-west-2 region: 35% 502 errors, p99 4s. us-east-1: normal. New DNS record deployed 30min before incident.
- 19%
[Eval][v1][en] Payment service connection pool exhaustion after batch job deploy
p99 latency 4.8s (up from 120ms), 12% 500 error rate, customers report failed checkouts