This commit is contained in:
2026-06-14 22:31:16 +03:00
parent 2ed29d44eb
commit 4c053d86b2
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -152,4 +152,4 @@ Authentication: pass `x-node-auth-key` as gRPC metadata (or in the `authKey` fie
The node sends `ReportNodeStats` every 2 s. `GET /admin/nodes/:id/runtime-status` returns the latest stored snapshot without polling the node; `?fromNode=true` forces a live HTTP fetch instead.
The node sends `ReportOnlineUsers` every 5 s. Core sets `online:user:{userId}` and `online:inbound:{nodeProtocolId}:user:{userId}` Redis keys with TTL 20 s. Existing `(userId, ip)` rows only receive a new `lastSeenAt`; missing pairs are inserted. IP information enrichment supports IPinfo.io and ip-api.com. A daily job refreshes all known addresses, while a job running every 10 minutes processes addresses with `firstSeenAt > now - 10 minutes`. Results are stored in `user_ips.info`. Core also emits a `user.online` domain event when the user had a gap > 10 s.
The node sends `ReportOnlineUsers` every 5 s. Core sets `online:user:{userId}` and `online:inbound:{nodeProtocolId}:user:{userId}` Redis keys with TTL 20 s. Existing `(userId, ip)` rows only receive a new `lastSeenAt`; missing pairs are inserted. Private RFC1918 IPv4 addresses, IPv4-mapped private addresses, and IPv6 ULA addresses can still establish online presence but are excluded from `user_ips` writes. IP information enrichment supports IPinfo.io, ip-api.com, and FindIP.net. FindIP requests are sent sequentially per IP, and failed lookups are skipped. A daily job refreshes all known addresses, while a job running every 10 minutes processes addresses with `firstSeenAt > now - 10 minutes`. Results are stored in `user_ips.info`. Core also emits a `user.online` domain event when the user had a gap > 10 s.