diff --git a/changes/2074.feature.md b/changes/2074.feature.md index e4960a2272..a11e7655f0 100644 --- a/changes/2074.feature.md +++ b/changes/2074.feature.md @@ -1 +1 @@ -Implement hit counter for detecting `suspicious_ips` \ No newline at end of file +Implement hit counter for detecting `hot_clients_ips` \ No newline at end of file diff --git a/src/ai/backend/manager/api/ratelimit.py b/src/ai/backend/manager/api/ratelimit.py index 5821e4d36b..ff29264494 100644 --- a/src/ai/backend/manager/api/ratelimit.py +++ b/src/ai/backend/manager/api/ratelimit.py @@ -49,9 +49,9 @@ local rate_limit = tonumber(ARGV[3]) local score_threshold = rate_limit * 0.8 - -- Add IP to suspicious_ips only if count is greater than score_threshold + -- Add IP to hot_clients_ips only if count is greater than score_threshold if rolling_count >= score_threshold then - redis.call('ZADD', 'suspicious_ips', rolling_count, id_value) + redis.call('ZADD', 'hot_clients_ips', rolling_count, id_value) end end