louislivi / SMProxy

Swoole MySQL Proxy 一个基于 MySQL 协议,Swoole 开发的MySQL数据库连接池。 A MySQL database connection pool based on MySQL protocol and Swoole.
https://smproxy.louislivi.com
MIT License
1.78k stars 257 forks source link

English clarification database: startConns/maxSpareConns/maxConns #77

Closed ValiDrv closed 3 years ago

ValiDrv commented 4 years ago

Hello

The read.me file is not that clear (in English) on a few things, can you please confirm:

database.databases: Connection pool:

If I want to start with 10 connections, and have a maximum of 25 connections to MySQL, but be able to make 10.000 connections to SMProxy, would this be correct:

# The number of connections made to the database from SMProxy when it starts?
startConns: 10 

# The MAXIMUM number of concurrent connections that can be made to the database from SMProxy?
maxSpareConns: 25 

# This would be the maximum number of connections the app can make to SMProxy? (the connection pool)?
maxConns: 10000  

database.serverInfo: No slaves

If you have just one MySQL instance (no slaves), is the "read" section required?

server.swoole

Is the max_coro_num related to the maxConns or maxSpareConns? What should this number be for 25 concurrent database connections and a pool of 10000 connections?

louislivi commented 3 years ago

startConns: 10 maxConns: 25
Unlimited number of SMProxy connections.

Not required.

This is the configuration of swoole has nothing to do with SMProxy.