Complete the code to choose the best option for a fully managed, event-driven compute service.
service = "[1]" # Choose the serverless compute option
Cloud Run is a fully managed serverless platform that runs containers on demand, ideal for event-driven workloads.
Complete the code to select the best option for running containerized applications with full control over orchestration.
service = "[1]" # Choose the container orchestration platform
Google Kubernetes Engine (GKE) provides full control over container orchestration and cluster management.
Fix the error in the decision code to select the best option for a workload needing automatic scaling without cluster management.
if workload == "event-driven" and needs_scaling: platform = "[1]"
Cloud Run automatically scales containers based on demand without requiring cluster management, ideal for event-driven workloads.
Fill both blanks to complete the decision logic for choosing between serverless and GKE based on control and scaling needs.
if needs_full_control == [1] and wants_serverless == [2]: platform = "Google Kubernetes Engine"
If full control is needed (True) and serverless is not wanted (False), GKE is the right choice.
Fill all three blanks to complete the function that decides the platform based on workload type, control, and scaling.
def choose_platform(workload_type, needs_control, auto_scale): if workload_type == [1] and not needs_control and auto_scale: return [2] else: return [3]
For event-driven workloads without control needs and requiring auto scaling, Cloud Run is best. Otherwise, GKE is chosen.