Google Professional Cloud Developer exam dumps

Google Professional Cloud Developer practice question 401 of 481

Professional Cloud Developer. Professional level, Google Cloud. Free question with the correct answer and a full explanation.

Google Professional Cloud Developer Question 401

Select 3Google Cloud Platform

You are developing a Node.js application running on Google Cloud Run that needs to connect to a Cloud SQL database. To ensure secure and efficient connection management, which of the following steps should you take?

  1. A

    Use the Cloud SQL Auth proxy to manage secure authentication to the database.

  2. B

    Set the database credentials as environment variables in your Cloud Run service.

  3. C

    Use connection pooling to reduce the overhead of establishing new database connections.

  4. D

    Allow public IP access to the Cloud SQL instance for easier connectivity.

  5. E

    Configure the Cloud SQL instance to use private IP and connect it to the same VPC as Cloud Run.

Show answer and explanation

Correct answers: A, C, E

Explanation

To securely and efficiently manage connections to Cloud SQL from Cloud Run, you should use the Cloud SQL Auth proxy for secure authentication, implement connection pooling to handle connection scalability, and configure private IP connectivity to ensure the database is not exposed to the public internet. These practices align with Google Cloud's best practices for security and performance.

  • A. Correct.

    Using the Cloud SQL Auth proxy ensures secure and managed authentication to the database. It simplifies access by automatically handling IAM and encryption.

  • B. Incorrect.

    While setting database credentials as environment variables is possible, it is not recommended as it may expose sensitive information without proper management tools like Secret Manager.

  • C. Correct.

    Connection pooling is essential for efficient database connection management, especially in serverless environments like Cloud Run, where instances can scale rapidly.

  • D. Incorrect.

    Allowing public IP access to the Cloud SQL instance may expose it to security risks and is not recommended unless absolutely necessary.

  • E. Correct.

    Configuring the Cloud SQL instance to use private IP and connecting it to the same VPC as Cloud Run ensures secure and efficient network communication.

Timed practice exam

Take a Google Professional Cloud Developer practice test under exam conditions

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

Start timed exam