Article 4R9K8 Many requests to php in a short time. How to deal with that?

Many requests to php in a short time. How to deal with that?

by
Pedroski
from LinuxQuestions.org on (#4R9K8)
Imagine this:

I set a multiple-choice evaluation exam on my webpage. 1000 students take the exam. The webpage comes online at 10am and switches off at 11am.

At 1 minute to 11am all the students click send. This might be like a mini DoS attack.

My php writes each student's answers as a text file to my webpage, adding the php microtime() function value to each student's student number as the file name.

Later I get them with rsync, as some kind people here showed me.

Is there any in-built method to deal with many requests to php at the same time?

Or would the webpage collapse?

Any tips on how to deal with this scenario please?

If I use php mail(), somehow, I don't know how, the mails are lined up and dealt with 1 after the other by the MTS. On a busy webhost, there may be thousands of customers sending email at the same time, so they must be queued and then sent, I think.

Checking this php this morning, looking at the microtime() value for milliseconds I find php needs about 0.5 milliseconds to complete a request of 25 answers.latest?d=yIl2AUoC8zA latest?i=icH6cpkdoRY:663R1UleIrc:F7zBnMy latest?i=icH6cpkdoRY:663R1UleIrc:V_sGLiP latest?d=qj6IDK7rITs latest?i=icH6cpkdoRY:663R1UleIrc:gIN9vFwicH6cpkdoRY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments