I am trying to run Indico with multiple servers to increase availability.
I noticed that the user session management seems to be “local”, i.e. if the request hits a different server than the previous one where I was logged in, I need to login again.
To avoid this, typically one puts the sessions to an outside DB like Redis.
There seem to be also a Flask library to manage things Server-side Sessions in Flask with Redis | TestDriven.io
Is my understanding correct? Is there a simple way already to manage the user session outside of the local server, as per the SQL database for example?
Thanks a lot in advance for any support
Sessions are stored in Redis. When using multiple workers, you need to make sure that:
- they use a single central redis server
- they connect to the same central Postgres instance (don’t run it on the workers machines in that case)
/opt/indico/archive is on shared storage; alternative uses the s3 storage plugin and store materials etc. on S3
Out of curiosity, did you read anything anywhere in our docs that made you think sessions are stored locally? :o
thanks for the very fast response!
I didn’t read anywhere that the sessions were stored locally but I was trying to do reverse engineering.
In fact, I am indeed using:
- an external, central Redis server
- an external, central Postgres server
- the S3 plugin to store materials
and you confirm that this setting makes the application completely stateless.
Still I was experiencing the re-login issue so I was wondering if Redis was used only for the Celery broker.
Maybe I will crosscheck again and see if the behavior persists.
So far I setup a node, create an image of the disk, create other nodes from the image, put a load balancer in front. I tried to use the containerized version but didn’t manage yet.
make sure you have the same
SECRET_KEY in every indico.conf