CodeGrade / hourglass

Web-based exam server.
13 stars 4 forks source link

Is there a plan to use a container-based scaling system like Kubernetes to be able to handle the load of many students taking an exam simultaneously? #281

Open avr1 opened 3 years ago

avr1 commented 3 years ago

In Fundies 1 last fall, I remember issues with the exam server where, when every student attempted to take an exam simultaneously, the times it would take the database to store the latest submissions would take longer and longer.

I'm creating this issue to ask: has this already been fixed? If not, would the ability to scale out using a container orchestration tool like Kubernetes, which would allow hourglass to run on a container managing a smaller amount of students, be a viable solution to this problem? Thanks!

blerner commented 3 years ago

Containerization isn't necessarily the solution here, because the bottleneck wasn't "storing the latest submissions", per se: it was the sheer number of active connections to...something. We're not sure if it was the number of active server connections, active database connections, active websocket connections, or something else entirely. Sharding the server into multiple instances poses its own challenges (among them, ensuring that professors can still proctor all students simultaneously, which means ensuring that there still is one definitive database underneath...which reintroduces the original database connectivity-limit issues). We had tried to diagnose and resolve this issue during the spring, and couldn't quite figure out which thing needed fixing -- because it worked under our tests. If you have experience trying to diagnose and resolve these kinds of provisioning issues, well, help is welcomed!