Nginx-if you send 10 thousand requests to a website, will php fail?

Source: Internet
Author: User
Almost all requests containing SQL commands are sent to a website at the same time, so that phpupdate1 has tens of thousands of data records. will php be suspended? Will it be processed one by one? Do I need to use a queue? What is the significance of using it? Almost all requests containing SQL commands are sent to a specific website at the same time, so that php update1 has tens of thousands of data records. will php be suspended? Will it be processed one by one?

Do I need to use a queue? What is the significance of using it?

Reply content:

Almost all requests containing SQL commands are sent to a specific website at the same time, so that php update1 has tens of thousands of data records. will php be suspended? Will it be processed one by one?

Do I need to use a queue? What is the significance of using it?

Several servers

Concurrency

First, requests will not generate fpm. for details, refer to the fpm configuration, which has the maximum number of processes. The subsequent requests are discarded, and the error 502 is returned. should this be common?

Even if you have a resource that can accommodate processes, PHP is still running very fast, that is, it takes only a long time to initialize, and the logic processing will soon end. link to mysql, can mysql accommodate 1 million connections at the same time? An SQL error is returned.

PHP and mysql are supported, so there is nothing to say and it will certainly not be paralyzed.

Based on your server resources (one server), we recommend that you use the queue mode. it is best to use the Singleton mode, which will not affect other services too much.

If the queue is used, it can be optimized. If all the data in one million requests is obtained and merged, can all the data be updated at a time? How many times (less than 1 W) can it be merged?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.