SAP-C02 exam dumps

SAP-C02 practice question 47 of 678

AWS Certified Solutions Architect - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

SAP-C02 Question 47

Select 2

Your company runs a multi-tier web application in AWS. The application uses an Auto Scaling group for the application tier and an Amazon RDS database for the backend. Recently, the application experienced a failure during a high traffic period due to the database being overwhelmed with connections. The development team has identified that the application tier sometimes does not properly close database connections, leading to connection exhaustion. As a solutions architect, how can you address this issue to prevent future database failures?

  1. A

    Enable Amazon RDS Proxy to manage and pool database connections for the application.

  2. B

    Increase the maximum number of connections allowed on the Amazon RDS instance.

  3. C

    Implement a retry mechanism in the application code to handle connection failures.

  4. D

    Use an Elastic Load Balancer to distribute database connections across multiple RDS instances.

  5. E

    Configure the application to use connection pooling at the application tier.

Show answer and explanation

Correct answers: A, E

Explanation

The issue arises because the application tier does not properly close database connections, leading to exhaustion of available connections. Amazon RDS Proxy (option 1) provides connection pooling and efficient connection management, helping prevent the issue without requiring major changes in the application. Additionally, configuring connection pooling at the application tier (option 5) ensures that the application reuses existing connections instead of opening new ones unnecessarily. These two solutions address the root cause of the problem effectively.

  • A. Correct.

    Enabling Amazon RDS Proxy helps manage and pool database connections, reducing connection exhaustion issues caused by mismanagement of connections in the application tier. This is a recommended solution for optimizing database connection management.

  • B. Incorrect.

    Increasing the maximum number of database connections temporarily mitigates the issue but does not address the root cause of connection mismanagement. It could lead to other problems like resource exhaustion on the database instance.

  • C. Incorrect.

    Implementing a retry mechanism in the application code addresses transient connection failures but does not solve the problem of connection exhaustion caused by unclosed connections.

  • D. Incorrect.

    Using an Elastic Load Balancer is not applicable for distributing database connections. Load balancers are used for distributing traffic to application instances, not database instances.

  • E. Correct.

    Configuring connection pooling at the application tier ensures that connections are reused effectively and not left open unnecessarily, which directly addresses the issue of connection exhaustion.

Timed practice exam

Take a SAP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam