OpenSlides/openslides
FinnStutzenstein bb2f958eb5 Redis: Wait for replication on writes
Since channels_redis does not support dedicated read-redis instances, the
autoupdate message may be received before the data was replicated. All workers
read the autoupdate message from the write host, so there is a race between
getting this message and a finished replication. For large payloads, the
replication is slower in the most cases (even more in a distributed setup, where
the master and replica are on different nodes). The easy way is to wait for
replication. But there is one difficulty: The number of replicas has to be
known. There is a new settings-variable "AMOUNT_REPLICAS" which defaults to 1.
It needs to be set correctly! If it is too high, every autoupdate will be
delayed by 1 seconds because of a timeout witing for non-existent replicas. If
it is too low, some autoupdates may be wrong (and not detectable by the client!)
becuase of reading from non-synchronised relicas.

The other possibility is to fork channel_redis and add the feature of a
read-only redis. This ould help, because on a single redis instance all commands
are ordered: First, the data is synced, then the autoupdate message. Attention:
This means, if redis-replicas are scaled up, one must make sure to read from the
same instance. I think this is not possible in the way how dockers overlay
networks work. The only way would be to open one connection and reuse the
connection from channels_redis in OpenSlides. This would mean a heavy
integration of channels_redis (meaning including the source code in our repo).

For the first fix, this one is easy and should work.
2020-04-01 13:09:48 +02:00
..
agenda number poll candidates depending on setting 2020-03-17 07:24:40 +01:00
assignments Rework assignment poll slide 2020-03-20 16:53:31 +01:00
core Changed the default projector aspect ratio to 16:9 on initial database creation 2020-03-24 12:09:11 +01:00
mediafiles Last changes and cleanup some todos 2020-03-17 07:24:50 +01:00
motions Updated translation strings and German translation. 2020-03-17 07:24:49 +01:00
poll Add global no and abstain to form 2020-03-17 07:24:48 +01:00
saml saml 2019-10-21 13:34:01 +02:00
topics generate less queries in the autoupdate system 2020-03-17 07:24:36 +01:00
users Add set present toggle in user menu 2020-03-30 09:57:57 +02:00
utils Redis: Wait for replication on writes 2020-04-01 13:09:48 +02:00
__init__.py Update version to 3.1.1-dev 2019-12-13 09:39:42 +01:00
__main__.py saml 2019-10-21 13:34:01 +02:00
asgi.py saml 2019-10-21 13:34:01 +02:00
global_settings.py Fixes python3.7 tests 2019-10-29 15:05:52 +01:00
routing.py Closing websocket connections to unknown urls 2019-10-15 10:54:31 +02:00
urls_apps.py saml 2019-10-21 13:34:01 +02:00
urls.py [WIP] External postgres as mediafile store 2020-02-17 14:38:32 +01:00