Home > Backend Development > PHP Tutorial > swoole uses task method to create database connection pool, performance

swoole uses task method to create database connection pool, performance

WBOY
Release: 2023-03-02 06:20:01
Original
1847 people have browsed it

I used swoole's task to implement the connection pool function and made a simple database query function

After using ab stress test, we found that compared with the native connection database, the performance is much worse

I feel like I have to send information to the task process every time, which consumes performance,

I wonder if the unsatisfactory pressure test result is what I understand?

Reply content:

I used swoole's task to implement the connection pool function and made a simple database query function

After using ab stress test, we found that compared with the native connection database, the performance is much worse

I feel like I have to send information to the task process every time, which consumes performance,

I wonder if the unsatisfactory pressure test result is what I understand?

The connection pool is to reduce the database load, not to improve client performance.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template