mars雪崩策略架构图
2018-12-20 11:36:39 0 举报
mars雪崩检测流程图
作者其他创作
大纲/内容
FlowLimit
cur_funnel_vol+len > kMaxVol
N
FrequencyLimit
interval < 10分钟且count > 75
拦截
遍历record列表
更新record:count++;SET time_last_update;
Record结构体:hashcounttime_last_update
Y
buffer是否存在record列表
设置流量速度:kActiveSpeed = 8 * 1024 * 1024 / 3600kInactiveSpeed = 2 * 1024 * 1024 / 3600
CHECK RECORD_INTERCEPT_COUNT
sending data:buffer
结束
计算buffer hash
拦截该data sending
record_clear interval计算
kInactiveSpeed = (2 * 1024 * 1024 / 3600);kActiveSpeed = (8 * 1024 * 1024 / 3600); kInactiveMinvol = (6 * 1024 * 1024);kMaxVol = (8 * 1024 * 1024);
count > 99
count是否大于105
buffer插入record列表
Clear Record
删除该record
大于60分钟
time_last_update计算interval
计算当前funnel大小:cur_funnel_vol_ -= interval * funnel_speed
RECORD_INTERCEPT_COUNT = 105NOT_CLEAR_INTERCEPT_COUNT_RETRY = 99NOT_CLEAR_INTERCEPT_COUNT = 75NOT_CLEAR_INTERCEPT_INTERVAL_MINUTE =10*60*1000 RUN_CLEAR_RECORDS_INTERVAL_MINUTE=60*60*1000
不拦截:cur_funnel_vol_ += _len
不拦截data sending
SET count=99
收藏
0 条评论
下一页