I am trying to determine the best option for controlling registration for courses where there is a hard limit of attendees per course and about 300 concurrent users trying to register for them at the exact same time (when the window opens for registration).
The 66 courses will fill to capacity in the span of about 6 to 7 minutes....so as you can imagine, the server will be hit pretty hard. It has the capacity to handle the load, but I am most concerned about making sure that each course is no longer available once it reaches its seat capacity limit. The users all have a profile already and are logged in so there is nothing being collected from them at the time of registration...they literally click the register button ....which means lots of hits to the server in a very short amount of time.
My plan is to build a view in MySQL that has a COUNT field to count the registrations in the registration table. The view also has a column for Seat Capacity for the course. A viewbox to display the courses and register button seems to be the lightest option. The register button would perform an Ajax callback to determine if the course was still open...if it was, then it would do a sql insert into the registration table using XBasic...otherwise it would refresh the viewbox to hide the button and show a message the course is at capacity. I would use client side templating to show or hide the button or message based upon the result of the callback.
Does this seem like a reasonable option or does someone have a suggestion on how to better handle this situation. This goes live on June 1st, so I need to come up with a solution fairly soon.
Thank you in advance for any advice or suggestions!
The 66 courses will fill to capacity in the span of about 6 to 7 minutes....so as you can imagine, the server will be hit pretty hard. It has the capacity to handle the load, but I am most concerned about making sure that each course is no longer available once it reaches its seat capacity limit. The users all have a profile already and are logged in so there is nothing being collected from them at the time of registration...they literally click the register button ....which means lots of hits to the server in a very short amount of time.
My plan is to build a view in MySQL that has a COUNT field to count the registrations in the registration table. The view also has a column for Seat Capacity for the course. A viewbox to display the courses and register button seems to be the lightest option. The register button would perform an Ajax callback to determine if the course was still open...if it was, then it would do a sql insert into the registration table using XBasic...otherwise it would refresh the viewbox to hide the button and show a message the course is at capacity. I would use client side templating to show or hide the button or message based upon the result of the callback.
Does this seem like a reasonable option or does someone have a suggestion on how to better handle this situation. This goes live on June 1st, so I need to come up with a solution fairly soon.
Thank you in advance for any advice or suggestions!
Comment