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.