mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-29 03:37:17 +00:00
⚡️(backend) replace blocking Redis KEYS with cursor-based SCAN
`cache.keys()` runs Redis `KEYS`, a full-keyspace scan on Redis's single thread that blocks everything else, including session reads in the same cache. Its cost scales with total keys, not matches, and some managed providers disable `KEYS` entirely. The trusted-lobby feature made this urgent: the waiting-list endpoint scanned on every poll, and its polling audience grows from a few admins to potentially every authenticated participant. Switch to cursor-based `SCAN` via two `core.utils` helpers, deleting in bounded batches so cleanup of a large room cannot block either. A single seam also lets us forbid raw `cache.keys()` going forward. `SCAN` still iterates the keyspace incrementally on the polled path. If monitoring flags it, the follow-up is a per-room set index — out of scope here since it changes the lobby storage model.
This commit is contained in:
committed by
aleb_the_flash
parent
943b81676b
commit
76a24d4787
@@ -512,3 +512,6 @@ def build_telephony_config():
|
||||
"default_country": country,
|
||||
"international_phone_number": international,
|
||||
}
|
||||
|
||||
|
||||
CACHE_SCAN_ITERSIZE = 500
|
||||
|
||||
Reference in New Issue
Block a user