Skip to content

Commit

Permalink
refactor: suspicious_ips -> hot_clients_ips
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Aug 5, 2024
1 parent f4982ae commit 38ae91a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion changes/2074.feature.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Implement hit counter for detecting `suspicious_ips`
Implement hit counter for detecting `hot_clients_ips`
4 changes: 2 additions & 2 deletions src/ai/backend/manager/api/ratelimit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 38ae91a

Please sign in to comment.