Tell me in general how it should look at the output:

There is a certain website which displays banner ads with a frequency of hits up to 200pcs per minute.
Each banner display generates ajax request to the server to save statistics, and returns the id of the saved display to the browser.
The response time from the server should not exceed 1 second.
At the same time, in parallel with saving the statistics on the server, the request should go to the back-up system, the answer to which takes 10-15 seconds.
It is necessary to implement a mechanism for creating a queue and sending requests to the back-up system with saving the result of the mandrel in the statistics table on the server.
The delay between displaying a banner and storing information on the backing system should not exceed 5 minutes.

Stack: php7 + mysql + js.

Where to begin ?

  • thanks for the correction) - Bumerang37
  • And how many parallel requests will bakand handle? If there is not much - you have a problem, the queue for the backend will grow endlessly and exceed 5 minutes ... because the queue’s growth rate of 200 per minute should be covered by the speed of the total processing of parallel queries with the backend - Mike
  • the number of requests is not specified, I think they can be neglected - Bumerang37
  • If you describe all the technologies you want to use and are not going to connect any caching systems in RAM, then when a request arrives, write statistics to the database, return id, the status of the record is "new". a set of background processes (or one multithreaded) constantly takes another new record (sample into work by a specific handler, for example, remainder id by dividing the number of processes that would not make locks) sends to backend, wait for the result, write the result in the same table changing status to "processed" - Mike
  • Thank you for your answer, the question is no longer relevant. - Bumerang37

0