SafeExamBrowser / seb-server-setup

Cotains resources and packages to setup and install SEB-Server. Currently only docker-based setup is supported
Mozilla Public License 2.0
7 stars 12 forks source link

Distributed Environment for SEB server #9

Closed ano010 closed 2 years ago

ano010 commented 2 years ago

Hi,

I kindly appreciate any input regarding the following...

Describe the bug I have been trying to set up the SEB server in a Kubernetes environmet to achieve scalability. It is running fine when there is only one instance. Though it fails when I increase the number of instances to two or more. I get a "The server session timed out" error when there is more than one instance.

To Reproduce Steps to reproduce the behavior:

  1. Deploy the SEB server in a distributed environment (I am using AKS)
  2. Scale it to have more than one instance
  3. Try to access the SEB server

Expected behavior It should work without the server session time out error

Screenshots

image

Setup

anhefti commented 2 years ago

Hi,

The session timeout normally applies after a certain amout of time, when the user-session has timed out. If this is the case, it is expected behavior. On the other hand, if the session timeout appears suddenly after login or randomly after some clicks, this might be caused from a incorrect setup.

If you have setup SEB Server on kubernetes then I expect that you have separated container/posts for your webservice as well as for you gui-service right? Your setup should look similar to the one in the below image: image

Very important are the sticky-sessions on the described load-balancers. Do you have this in place? Another point is to set the right env Variables within the gui-service setup as well as for the webservice setup. If you have proper sticky session in place and it don't work, please check your env Variables and make sure your gui-services are communicating with the web-service through the external load-balancer and the sticky sessions are in place.

Also be aware that sticky session must work with (stick to) client-IP address for SEB connections (not with cookies or some other browser related) since the SEB is not a usual browser client.