1

I have a legacy system for managing courses at the university. Every half year, this happens:

  • limited capacity course (30 people) opens
  • 1000 people trying to enroll in that course at the same time (literally waiting at computers to hit the "enroll" button at 8:00am sharp)
  • dozens/hundreds of courses like that, thousands of people in the system fighting for free slots at the same time
  • system goes down...

I wonder if Redis could help here. I cannot replace the legacy system (PHP based). I cannot spread the load either - all people have to have equal opportunity here.

My questions, please:

  • is Redis a good solution here?

  • Which data types and commands would you use for this use case? A rough outline of potential solution would be highly appreciated. I think it would be something with INCR but nor sure how to put it together with the rest.

  • Can this be realistically handler in (semi)real-time? i.e. if 1000 ppl hit the enroll button, 30 of them get the "yes" answer immediately, and the rest gets the "no" answer also immediately (matter of seconds, at most)

Thank you very much!

Josef Richter
  • 499
  • 1
  • 9
  • 16

0 Answers0