0
0
GCPcloud~20 mins

Cloud Run vs Cloud Functions decision in GCP - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cloud Run vs Cloud Functions Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Choosing between Cloud Run and Cloud Functions for HTTP workloads

You have a simple HTTP API that needs to scale automatically and handle short requests. Which service is best suited for this?

ACloud Run, because it supports containerized apps and scales automatically for HTTP requests.
BCloud Functions, because it only supports background tasks, not HTTP requests.
CCloud Run, because it requires manual scaling and is better for batch jobs.
DCloud Functions, because it cannot scale automatically.
Attempts:
2 left
💡 Hint

Think about which service supports containers and automatic scaling for HTTP.

Architecture
intermediate
2:00remaining
Selecting a service for event-driven processing with short execution time

You want to process events from a Pub/Sub topic with a function that runs quickly and scales automatically. Which service should you choose?

ACloud Functions, because it natively integrates with Pub/Sub and scales automatically for short tasks.
BCloud Run, because it is designed for event-driven functions only.
CCloud Run, because it cannot be triggered by Pub/Sub events.
DCloud Functions, because it requires manual scaling for event triggers.
Attempts:
2 left
💡 Hint

Consider which service integrates directly with Pub/Sub and is optimized for short event processing.

security
advanced
2:00remaining
Securing a Cloud Run service with authentication

You deploy a Cloud Run service that should only be accessible by authenticated users from your organization. Which approach enforces this?

ASet the Cloud Run service to allow unauthenticated invocations and rely on app code for authentication.
BMake the Cloud Run service public and use firewall rules to block external IPs.
CUse Cloud Functions instead, because Cloud Run cannot restrict access.
DConfigure Cloud Run to require authentication and use Identity-Aware Proxy (IAP) to restrict access to your organization.
Attempts:
2 left
💡 Hint

Think about built-in Google Cloud tools for authentication and access control.

Best Practice
advanced
2:00remaining
Optimizing cost for a service with unpredictable traffic

You have a backend service with unpredictable traffic spikes. You want to minimize cost while ensuring fast response times. Which service and configuration is best?

AUse Cloud Functions with manual scaling to control costs.
BUse Cloud Run with minimum instances set to zero to scale down to zero when idle and scale up quickly on demand.
CUse Cloud Run with minimum instances set to a high number to avoid cold starts.
DUse Cloud Functions with a fixed number of instances to handle spikes.
Attempts:
2 left
💡 Hint

Consider how to balance cost and performance with scaling settings.

service_behavior
expert
2:00remaining
Understanding request timeout behavior differences

You deploy a Cloud Function and a Cloud Run service. Both receive HTTP requests that take 10 minutes to process. What happens to the requests?

ACloud Run will timeout before 10 minutes; Cloud Functions can handle requests longer than 10 minutes.
BBoth Cloud Functions and Cloud Run allow unlimited request duration by default.
CCloud Functions will timeout before 10 minutes; Cloud Run can be configured to allow 10-minute or longer requests.
DBoth services timeout at exactly 5 minutes and drop the requests.
Attempts:
2 left
💡 Hint

Check default and maximum request timeout limits for each service.