Correct Answer: Use `gcloud alpha cloud-shell ssh` to connect and run the script in a `tmux` or `screen` session, or better — submit the job to Cloud Batch or a Compute Engine VM
Cloud Shell is designed for interactive, lightweight tasks — not long-running compute jobs. For resource-intensive scripts: (1) Cloud Batch is purpose-built for batch jobs with aut...
Correct Answer
Use `gcloud alpha cloud-shell ssh` to connect and run the script in a `tmux` or `screen` session, or better — submit the job to Cloud Batch or a Compute Engine VM
Why This Answer Is Correct
Cloud Shell is designed for interactive, lightweight tasks — not long-running compute jobs. For resource-intensive scripts: (1) Cloud Batch is purpose-built for batch jobs with auto-scaling and retry. (2) Compute Engine VMs persist indefinitely. (3) Connecting via `gcloud alpha cloud-shell ssh` with `tmux`/`screen` maintains the session even if the browser disconnects, but Cloud Shell still has resource and usage limits. `nohup` prevents hangup signals but doesn't prevent Cloud Shell's inactivity timeout.
Your Cloud Function processes images uploaded to Cloud Storage. It intermittently times out on large files. The function is configured with 60s timeout and 256MB memory. What is the most effective fix?
A Cloud Function triggered by Pub/Sub is executing duplicate processing for some messages. Your team suspects at-least-once delivery is causing duplicate triggers. What is the recommended pattern to achieve exactly-once processing?
A developer uses Cloud Shell to run `gcloud` commands that modify production resources. As a Cloud Architect, what control should you implement to prevent accidental production changes from Cloud Shell?
What persists between Cloud Shell sessions?
A developer needs to preview a web application running on port 8080 inside Cloud Shell without exposing it publicly. What feature enables this?