fix: expose cooldown details and make 503 backoff configurable

This commit is contained in:
X-Zero-L
2026-03-02 21:53:18 +08:00
parent 96706c27f6
commit e611f97dae
6 changed files with 217 additions and 37 deletions

View File

@@ -232,6 +232,8 @@ const config = {
// ⏱️ 上游错误自动暂停配置
upstreamError: {
serviceUnavailableTtlSeconds:
parseInt(process.env.UPSTREAM_ERROR_503_TTL_SECONDS) || 60, // 503错误暂停秒数
serverErrorTtlSeconds: parseInt(process.env.UPSTREAM_ERROR_5XX_TTL_SECONDS) || 300, // 5xx错误暂停秒数
overloadTtlSeconds: parseInt(process.env.UPSTREAM_ERROR_OVERLOAD_TTL_SECONDS) || 600, // 529过载暂停秒数
authErrorTtlSeconds: parseInt(process.env.UPSTREAM_ERROR_AUTH_TTL_SECONDS) || 1800, // 401/403认证错误暂停秒数