Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

write some words about redis #7402

Closed
richvdh opened this issue May 4, 2020 · 7 comments
Closed

write some words about redis #7402

richvdh opened this issue May 4, 2020 · 7 comments
Assignees
Labels
A-Docs things relating to the documentation

Comments

@richvdh
Copy link
Member

richvdh commented May 4, 2020

No description provided.

@babolivier babolivier added A-Docs things relating to the documentation release blocker and removed release blocker labels May 4, 2020
@richvdh
Copy link
Member Author

richvdh commented May 6, 2020

redis is an alternative to direct tcp connections to the master: rather than all the workers connecting to the master, all the workers and the master connect to redis, which relays replication commands between processes. this can give a significant cpu saving on the master and will be a prerequisite for operation gemini work.

  1. Install redis following the normal procedure for your distro - eg apt install redis-server for debian/ubuntu
  2. check it's running and accessible: you should be able to echo PING | nc -q1 localhost 6379 and get a response of +PONG.
  3. Add config to homeserver.yaml:
    redis:
      enabled: true
    Optional parameters which can go alongside enabled are host, port, password, dbid. If you don't know if you need the last two, you probably don't.
  4. That's it. Restart master and all workers.
  5. the type: replication listener documented in https://github.com/matrix-org/synapse/blob/master/docs/workers.md#configuration is now redundant. (the type: http one is still needed).

Question: should we put this in the sample config yet?

@Demi-Marie
Copy link

If we support AF_UNIX connections as well as TCP connections, a performance boost can be expected.

@richvdh
Copy link
Member Author

richvdh commented May 11, 2020

done in #7446.

@richvdh
Copy link
Member Author

richvdh commented May 11, 2020

@demimarie-parity txredisapi doesn't support unix-domain sockets afaict and it's not entirely obvious to me that the performance boost would be anything other than trivial

@richvdh richvdh closed this as completed May 11, 2020
@jkhsjdhjs
Copy link

@richvdh txredisapi supports unix domain socket since at least 2013: https://github.com/IlyaSkriblovsky/txredisapi#features

@Dual-0
Copy link

Dual-0 commented Jun 18, 2022

Is adding redis via unix socket possible in the future? Do we need a new issue/feature_request?

@ShadowJonathan
Copy link
Contributor

I'd recommend filing a new issue for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docs things relating to the documentation
Projects
None yet
Development

No branches or pull requests

6 participants