I built the environment using ci and wrote the code to test it
mysql + memcache
The interface only returns json data. Each request is about 3-4K (not much)
The test result is wonderful 400 requests
Is this result very bad?
Requests per second: 401.43 [#/sec] (mean)
If I directly access PHP to echo a character, rps is about 2000. Once added to the ci framework code to echo a string, rps will become more than 500, which is not much different from 400.
I feel that pure PHP is better than CI for concurrent testing
Does the configuration of the CI framework need to be modified? Or what needs to be done?
Reply content:
mysql + memcache
The interface only returns json data. Each request is about 3-4K (not much)
Is this result very bad?
Requests per second: 401.43 [#/sec] (mean)
I feel that pure PHP is better than CI for concurrent testing
What’s the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem? What's the problem?
Does the configuration of the CI framework need to be modified? Or what needs to be done?
I think the framework itself is much more complicated than pure PHP. It introduces various complexities... so it will definitely consume more resources and time... The framework is first of all to improve development efficiency... so it cannot execute the Efficiency is the first priority... Of course there are some means to optimize... such as Xcache APC, etc... Then optimize the server...
You can try to use ab to test baidu, sina, qq and other major domestic websites to see what their RPS is and compare it.