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:
mongo session
includes setting the servers timeouts
Tests included/Docs Updated?
[ ] Included for each change/fix?
[ ] Passing? (Merge will not be approved unless this is checked)
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:
mongo session
includes setting the servers timeouts
Tests included/Docs Updated?
[ ] Included for each change/fix?
[ ] Passing? (Merge will not be approved unless this is checked)
[ ] Docs updated?
[x] New packages used/requires npm install?
[ ] Toggle added for new features?