降低云触手 bind_info 限频(110001)命中率
识别中文过于频繁错误并指数退避;bind_info 加长间隔与短缓存; 领取轮询放慢并去掉同轮重复 probe,减轻上游压力。
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { isClaimInactiveTaskStatus } from '@/domain/task-status'
|
||||
import type { ClaimSnapshot } from './claim-snapshot'
|
||||
|
||||
export const BINDING_PREPARE_POLL_MS = 5_000
|
||||
export const ROLE_FAST_POLL_MS = 10_000
|
||||
export const ROLE_SLOW_POLL_MS = 30_000
|
||||
export const ROLE_IDLE_POLL_MS = 60_000
|
||||
export const ROLE_FAST_WINDOW_MS = 3 * 60_000
|
||||
/** 绑链准备中:略放缓,减少空转 */
|
||||
export const BINDING_PREPARE_POLL_MS = 8_000
|
||||
/** 角色快轮询:原 10s → 25s,降低 bind_info 压力 */
|
||||
export const ROLE_FAST_POLL_MS = 25_000
|
||||
export const ROLE_SLOW_POLL_MS = 45_000
|
||||
export const ROLE_IDLE_POLL_MS = 90_000
|
||||
/** 快轮询窗口:原 3 分钟 → 2 分钟 */
|
||||
export const ROLE_FAST_WINDOW_MS = 2 * 60_000
|
||||
export const ROLE_IDLE_WINDOW_MS = 10 * 60_000
|
||||
export const FEIFEI_POLL_MS = 15_000
|
||||
export const FEIFEI_POLL_MS = 20_000
|
||||
|
||||
export function resolveRolePollDelayMs(
|
||||
nextSnapshot: ClaimSnapshot,
|
||||
@@ -35,6 +38,11 @@ export function resolveRolePollDelayMs(
|
||||
delay = ROLE_SLOW_POLL_MS
|
||||
}
|
||||
|
||||
// 已拿到角色但未匹配:不必高频刷,稍放缓即可
|
||||
if (nextSnapshot.roleId && !nextSnapshot.isUidMatched) {
|
||||
delay = Math.max(delay, ROLE_SLOW_POLL_MS)
|
||||
}
|
||||
|
||||
return {
|
||||
delay,
|
||||
baseline: { roleKey: baselineKey, at: baselineAt },
|
||||
|
||||
Reference in New Issue
Block a user