Improved Database Connection Management
This update introduces connection pooling for handling communication with the database. Connection pooling can dramatically enhance application performance as it eliminates the overhead of initiating a new connection for every database operation. However, as part of this improvement, the options for 'keep alive' in the configuration were removed and replaced with a connection limit. This limit sets a cap on the number of simultaneous connections that the application can have with the database, helping to manage resource allocation more effectively.
createConnection
withcreatePool
to enable connection pooling for better performance and scalabilityconnectionLimit
to 20 to limit the number of concurrent connections