mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Don't need to use redis to block tracker ips
There could be many of them, so reduce load by storing IPs directly inside node memory
This commit is contained in:
parent
7624270a63
commit
1fed9cb8d3
3 changed files with 20 additions and 32 deletions
|
@ -781,6 +781,9 @@ const LRU_CACHE = {
|
|||
VIDEO_TOKENS: {
|
||||
MAX_SIZE: 100_000,
|
||||
TTL: parseDurationToMs('8 hours')
|
||||
},
|
||||
TRACKER_IPS: {
|
||||
MAX_SIZE: 100_000
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -884,7 +887,7 @@ const TRACKER_RATE_LIMITS = {
|
|||
INTERVAL: 60000 * 5, // 5 minutes
|
||||
ANNOUNCES_PER_IP_PER_INFOHASH: 15, // maximum announces per torrent in the interval
|
||||
ANNOUNCES_PER_IP: 30, // maximum announces for all our torrents in the interval
|
||||
BLOCK_IP_LIFETIME: 60000 * 3 // 3 minutes
|
||||
BLOCK_IP_LIFETIME: parseDurationToMs('3 minutes')
|
||||
}
|
||||
|
||||
const P2P_MEDIA_LOADER_PEER_VERSION = 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue