Answer the question
In order to leave comments, you need to log in
How to optimize the server for 1000 requests every minute?
Hello. Every minute, cron runs one script, which calls about 1000 scripts through cURL multithreading (more precisely, one script, different IDs). On average, processing one request takes from 5 to 30 seconds. No matter how much the tariff is increased, it cannot cope with a large number of requests. You have to use about 4 VPS, which is quite difficult. Tell me how to optimize? PHP scripts.
Answer the question
In order to leave comments, you need to log in
Running a script is a relatively time-consuming thing. Try to pass id-shniks to scripts not one at a time, but in batches, and process them in a cycle in the script.
But here you need to look logically at what exactly the script does and how you can optimize its logic of work. For example, to cache results of a selection from a database. Write results once at the end of the query instead of one at a time (if possible). What version of PHP is it, is the code byte cache enabled?
Как вы предлагаете что-то вам советовать не видя собственно виновника вопроса и не понимаю что вообще происходит?
Почитайте материалы про сервер очередей:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question