Module 2: Fundamentals of Cloud Run

Looking for โ€˜Developing Applications with Cloud Run on Google Cloud: Fundamentals Module 2 Answersโ€™?

In this post, I provide complete, accurate, and detailed explanations for the answers to Module 2: Fundamentals of Cloud Run of Developing Applications with Cloud Run on Google Cloud: Fundamentals โ€“ Preparing for Google Cloud Certification: Cloud Developer Professional Certificate

Whether youโ€™re preparing for quizzes or brushing up on your knowledge, these insights will help you master the concepts effectively. Letโ€™s dive into the correct answers and detailed explanations for each question!

Quiz

Graded Assignment

1. Which of these statements about Cloud Run are correct? Select three.

  • You cannot access internal Google Cloud resources in your network from Cloud Run.
  • On Cloud Run, your code can either run continuously as a service, or as a job. โœ…
  • To access a service on Cloud Run, you must manually provision an HTTP endpoint.
  • Cloud Run is serverless. โœ…
  • Cloud Run integrates with other Google Cloud services. โœ…

Explanation:

  • Cloud Run supports two execution models:

    • Services (long-running processes)
    • Jobs (short-lived batch jobs)
  • Cloud Run is serverless, meaning it abstracts infrastructure management.
  • It integrates with Google Cloud services like Cloud SQL, Firestore, and Pub/Sub.

2. What are some characteristics of Cloud Run services? Select three.

  • Cloud Run services are regional Google Cloud resources. โœ…
  • A service revision can be modified or updated.
  • Cloud Run automatically scales a service revision. โœ…
  • You must manually route requests to the latest revision of your Cloud Run service.
  • Each deployment of your application container image to Cloud Run creates a service revision.

Explanation:

  • Cloud Run services run in specific Google Cloud regions.
  • Cloud Run automatically scales services based on incoming traffic.

3. What are some characteristics of an idle container? Select four.

  • An idle container has its CPU throttled. โœ…
  • An idle container can be shut down at any time. โœ…
  • An idle container does not service requests. โœ…
  • An idle container does not incur charges by default. โœ…
  • An idle container can reliably perform background tasks.

Explanation:

  • Idle containers have their CPU throttled to reduce cost.
  • They can be shut down anytime when not in use.
  • Idle containers do not handle requests until activated.
  • Billing is based on usage, so idle containers do not incur charges unless they are running.

4. Which of these statements about autoscaling in Cloud Run are correct? Select three.

  • Cloud Run automatically increases the number of container instances of a service revision when necessary. โœ…
  • If there are no incoming requests to your service, by default even the last remaining container instance will be shut down. โœ…
  • As your service receives requests, the number of active instances might decrease and the number of idle instances increase.
  • In Cloud Run, a container instance can receive and process only a single request at a time.
  • When the number of requests to a service decreases, Cloud Run reduces the number of container instances. โœ…

Explanation:

  • Cloud Run scales up instances as needed when traffic increases.
  • It shuts down idle instances by default to save costs.
  • As traffic decreases, Cloud Run reduces the number of active instances.

5. How can you make a Cloud Run service publicly accessible and invokable without authentication?

  • Use the โ€“-allow-unauthenticated option when you deploy the service to Cloud Run. โœ…
  • A Cloud Run service cannot be invoked publicly.
  • A Cloud Run service is publicly accessible and can be invoked without authentication by default.

Explanation:

  • By default, Cloud Run requires authentication.
  • To make a service publicly accessible, use: gcloud run deploy โ€“allow-unauthenticated

Leave a Reply