Nginx-how many computing resources are required for the php interface with a peak value of 40 thousand/s?

Source: Internet
Author: User
Some interfaces written in php (which looks like the yii framework) (without front-end webpages) have a peak request of about 40 thousand s (by analyzing access. log), how many cpu and memory resources are needed to survive? Estimation methods and ideas: Some interfaces written by php (which looks like the yii framework) (without front-end web pages), the peak request is about 40 thousand/s (by analyzing access. log), how many cpu and memory resources are needed to survive? Estimation methods and ideas

Reply content:

Some interfaces written in php (which looks like the yii framework) (without front-end webpages) have a peak request of about 40 thousand/s (by analyzing access. log), how many cpu and memory resources are needed to survive? Estimation methods and ideas

First, we need to clarify the following points:

1. in the case of performance bottlenecks, we should not increase the cpu and memory vertically (purchase better servers) to relieve the pressure, but scale horizontally to increase the number of servers to relieve the request pressure.
2. The server should pay attention to its throughput, and try to increase the throughput by improving the resource utilization (cpu and memory usage.

So the following is a reasonable estimation method:

First, you need to deploy the program on a machine, and then use webbench to test the QPS (system throughput) of the machine ). Assuming that the QPS of a single machine is 1 w/s, it means that four such machines need to process requests through Server Load balancer.

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.