SciCatProject / backend-v3

SciCat Data Catalogue Backend
https://scicatproject.github.io/documentation/
BSD 3-Clause "New" or "Revised" License
13 stars 17 forks source link

OIDC session on mongo #725

Closed minottic closed 1 year ago

minottic commented 1 year ago

Description

Store OIDC session on mongo to enable horizontal scaling

Motivation

Horizontal scaling is useful when multiple instances of the same be are required, to manage bigger loads or decrease the downtime in case of failures. Since the OIDC login is stateful in the be, as it uses connect.sessionIds to follow the user login, such a session cannot be stored in memory if more than one be instance is running, as the login flow could potentially be initiated by one instance and finished in a second (which will then fail to find the session in its memory). Storing the session on mongo enables its sharing between the be instances

Changes: