- Joined
- Nov 21, 2022
- Messages
- 1
- Reaction score
- 0
I have been reading multiple resources on connection pooling and I'm confused at the most fundamental level here.
So say we initialized the pool object with script:
So as per my understanding application code runs anew for each client http request.
Hence this creation of pooling may be initialized again (?) with every new request.
How does this actually work? If anyone could enlighten me with this basics.
So say we initialized the pool object with script:
Code:
from mysql.connector import pooling
try:
connection_pool = pooling.MySQLConnectionPool(pool_name="pynative_pool",
pool_size=1,
pool_reset_session=True,
host='localhost',
database='python_db',
user='pynative',
password='pynative@#29')
So as per my understanding application code runs anew for each client http request.
Hence this creation of pooling may be initialized again (?) with every new request.
How does this actually work? If anyone could enlighten me with this basics.