HTTP 429 Too Many Requests 的定位与处理
客户端收到 429 Too Many Requests,通常带 Retry-After 或 X-RateLimit-* 响应头。可能是限流策略、突发流量、重试风暴或共享出口 IP。
curl -v http://<host>/api
curl -sI http://<host>/api | grep -i -E 'retry-after|ratelimit|x-rate'
nginx -T | grep -nE 'limit_req|limit_conn'
tail -f /var/log/nginx/error.log
Retry-After,加入指数退避和 jitter。limit_req 的 rate/burst 和 limit_conn。nginx — 限流配置curl — 查看响应头promtool — 限流指标