Cloud Run and Cloud SQL Auth Proxy: Cost Implications of CPU Always Allocated for Low‑Traffic Workloads
0 reputation · 30 Nov 2024, 03:37 UTC
Goal: Determine whether enabling the CPU always allocated option for a low‑traffic Cloud Run service that runs the Cloud SQL Auth proxy side‑car reduces overall cost when request frequency is below one per minute.
Constraints: The service must stay within the free tier where possible, keep latency acceptable for occasional users, and maintain a minimal memory footprint so the smallest instance class (e.g., f1‑micro) can still run the proxy without connection errors. The uncertainty lies in balancing continuous vCPU charges against potential cold‑start latency when CPU allocation is disabled, especially given the proxy’s own start‑up time.
Specific questions: Does enabling CPU always allocated increase vCPU usage enough to negate any latency benefit for sub‑minute traffic? Can the Cloud SQL Auth proxy operate reliably on the smallest allowed instance when CPU is not always allocated? What is the expected cold‑start latency impact when CPU allocation is turned off for a service that depends on the proxy?