Google Professional Cloud Database Engineer Question 59
Select 3Google Cloud PlatformA financial services company is using a PostgreSQL database on Cloud SQL to handle their transactional workloads. However, they are experiencing performance bottlenecks due to a high number of short-lived connections being opened and closed by their application. Which of the following justifies the use of a session pooler service like PgBouncer in this scenario?
- A
Reduces overhead caused by frequent opening and closing of database connections.
- B
Improves database security by encrypting all client connections to the database.
- C
Enables connection reuse, minimizing the time spent on establishing new connections.
- D
Adds advanced query optimization techniques to reduce query execution time.
- E
Helps scale applications by efficiently managing a fixed number of database connections.
Show answer and explanation
Correct answers: A, C, E
Explanation
Session pooler services like PgBouncer help address performance issues in scenarios with high connection churn by reducing the overhead of connection management. They enable connection reuse and efficient management of a limited number of database connections, which is crucial for scaling applications. However, session poolers do not provide features like query optimization or encryption, as those are handled by other layers or tools.
- A. Correct.
Correct. Session poolers like PgBouncer reduce the overhead associated with frequent connection establishment and teardown, which is a common cause of performance bottlenecks in high-concurrency scenarios.
- B. Incorrect.
Incorrect. While session poolers can help manage database connections, they do not inherently provide encryption for client connections. Encryption is managed through other features like SSL/TLS.
- C. Correct.
Correct. Session poolers reuse existing database connections, allowing applications to avoid the latency and resource usage of creating new connections repeatedly.
- D. Incorrect.
Incorrect. Session poolers do not perform query optimization. Query optimization is handled by the database engine itself.
- E. Correct.
Correct. By efficiently managing a pool of connections, session poolers can help applications scale better by ensuring that a fixed number of database connections are shared among multiple application requests.