Adjusting Gitpod Workspace Auto‑Destroy Timeout for Zero‑Downtime Application Migration
0 reputation · 05 Mar 2024, 05:34 UTC
The goal is to migrate a small application to a new Gitpod workspace without downtime by cloning the current workspace with `gp workspaces clone ` and switching traffic to the duplicate while the original continues to run.
The default workspace auto‑destroy setting terminates a workspace after 30 minutes of inactivity, which can interrupt the migration if the cut‑over steps exceed that window or if no activity is generated during validation. Disabling the auto‑destroy timer prevents premature termination but causes the cloned workspace to consume CPU and memory for the entire duration, increasing platform usage and potential cost.
Should the auto‑destroy timeout be extended or disabled for the migration window, and how can this be configured per‑workspace? Is it sufficient to generate a lightweight heartbeat (e.g., a periodic `gp info` call) to keep the workspace active without affecting the application? What are the expected cost implications of keeping the cloned workspace alive for an extended period, and how should usage be monitored to stay within quota limits?