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

swoole uses task method to create database connection pool, performance

WBOY
WBOYOriginal
2016-12-01 00:56:441820browse

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.

Statement:
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