- Newest
- Most votes
- Most comments
Based on the information available, I cannot provide a specific answer about how KEDA (Kubernetes Event-driven Autoscaling) handles database connections across ScaledObjects, as KEDA is not mentioned in the provided sources.
However, I can offer some general guidance about database connection management in AWS environments that might be relevant to your situation:
For applications that need to manage multiple database connections, connection pooling is a recommended practice. Connection pooling reduces the overhead associated with opening and closing connections and managing many simultaneous connections. This is especially important when you have multiple services or components querying the same database.
If you're using AWS services, Amazon RDS Proxy could help address your concern. RDS Proxy is a fully managed database proxy that handles connection pooling and multiplexing. It can significantly reduce the number of connections to your PostgreSQL database by reusing connections from a pool. RDS Proxy performs connection pooling separately for writer and reader instances and implements connection multiplexing (connection reuse).
For Lambda functions or other serverless components, it's recommended to reuse database connections across multiple invocations rather than creating new connections each time, which reduces latency and resource utilization.
If you're experiencing issues with too many connections being created to your PostgreSQL database, implementing a connection pooling solution like RDS Proxy could help mitigate this problem without requiring code changes for most applications.
Sources
Managing connections - AWS Prescriptive Guidance
RDS Proxy concepts and terminology - Amazon Relational Database Service
RDS Proxy concepts and terminology - Amazon Aurora
Community | Lambda Monitoring Made Simple: Observe, Learn, and Optimize
Relevant content
- asked 7 months ago
- asked 4 years ago
- AWS OFFICIALUpdated 3 years ago
