This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Move USER_IP
replication command to a separate redis pub/sub channel.
#12460
Closed
Labels
T-Task
Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Currently all replication commands get sent to all workers via the single pub/sub stream. This can be a lot of traffic, roughly evenly split between
USER_IP
andRDATA
commands.However, only a subset of workers care about
USER_IP
commands, and the rest just immediately drop them on receipt:synapse/synapse/replication/tcp/handler.py
Lines 412 to 423 in e3a49f4
Instead of sending them to the same pub/sub channel, we should send
USER_IP
commands to a separate channel that is only subscribed to by workers that need them.This would involve changing the stream name we send the
USER_IP
command to here:synapse/synapse/replication/tcp/redis.py
Lines 219 to 221 in e3a49f4
And change the channels we subscribe to:
synapse/synapse/replication/tcp/redis.py
Line 121 in e3a49f4
The text was updated successfully, but these errors were encountered: