Does php persistent connection need to be done using the proxy module?

Source: Internet
Author: User
RT must be a proxy module, or can it be directly implemented using php? We will discuss whether RT must be a proxy module or php can be used directly.
Nobody knows?
For discussion

Reply content:

RT must be a proxy module, or php can be used directly.
Nobody knows?
For discussion

Recently I also encountered the same problem. If there is no persistent connection when the concurrency is high, creating a network connection will waste a lot of resources.
When the PHP runtime environment is Nginx + PHP-FPM, using pconnect will cause the established connection will not be released while the new connection is constantly created, the final consequence is that all available network IO is quickly consumed.
I think I can use the mysql-proxy connection pool, but there are also problems. I don't know if it is a ro-pooling script problem. A large number of 1105 errors are generated during use, it probably means errors such as backends down, and it does not work to adjust the script.
Later I studied sqlrelay. I used sqlrelay in and 06 years. I was not very impressed at the time. I needed a large number of transformation programs, but I still had transaction errors, therefore, sqlrelay is not given priority this time. However, we can see that many versions have been released since the previous use, and you can directly use them without transformation. Therefore, we plan to perform a test.
No better solutions have been found. Let's discuss it.

I don't know if I understand what you mean correctly.

The Execution Mode of PHP determines that it is not suitable for persistent connections.
I understand that you need real-time web information interaction. Sf now seems to be a request every 10 seconds.

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.