Menu
Back to Discussions

Database connection pooling: pre-warm or on-demand?

Ingrid Borg
Ingrid Borg
·2038 views
hey everyone, I've been thinking about how we handle database connections in our microservices. Specifically, connection pooling. Should we be pre-warming our connection pools when a service starts up, or is it better to just grab a connection from the pool as needed? Pre-warming seems like it might reduce latency for the first few requests, but could also waste resources if the service doesn't get much traffic. On-demand seems more resource-efficient but might introduce a slight delay on initial access. What are your thoughts and experiences with this? Any specific scenarios where one approach is clearly better than the other
36 comments

Comments

Loading comments...