This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Using an external cache server #2123
Open
Description
I found that synapse uses a cache, implemented its own means (synapse/util/caches).
This creates some difficulties:
- with scaling (workers must communicate with master process in order to have the same data in the cache and with the database)
- with clustering for high availability (I've read @ara4n in #matrix:matrix.org that the synapse does not provide the clustering capability).
I believe that using an external cache server like memcached or reddis could solve these problems.
The advantages of an external cache:
- it can be accessed by all the processes of application, possibly running on several nodes.
- memory storage is quite efficient, and done in a separate process.
- it becomes possible to configure workers to use same cache and same database as synapse.
- it becomes possible to configure two synapse servers are behind the balancer and work with one cache and a shared database.