I have more than 30 databases and I want to use connection pool in my python code.
conn = mysql.connector.connect(
host=MYSQL_HOST,
user=MYSQL_USERNAME,
passwd=MYSQL_PASSWORD,
database=database,
charset='utf8',
use_unicode=True,
pool_name='connection_pool',
pool_size=10
)
In API calls, based on sub-domain, I have to decide which database to connect. For example "abc.mydomain.com", so I have to connect to abc's database. It is working fine with a single connection but It's taking time each time it tries to connect to the database.