GCP Cost Estimation
tsdevstack is free and open source. All costs on this page are paid directly to Google Cloud. There is no bill from tsdevstack and there never will be.
These are estimates based on published GCP pricing as of July 2026 in a US region (us-central1). Actual costs depend on your region, traffic, and any pricing changes by Google. Always verify with the official pricing pages linked at the bottom.
The AI buildout is squeezing server hardware supply, and that is expected to reach cloud list prices in the second half of 2026. As of July 2026 the GCP rates on this page are unchanged. Server memory contract prices rose sharply through the first half of 2026, and there is typically a 6 to 9 month lag before that shows up in cloud pricing, with forecasts pointing to roughly 5-10% general increases.
On GCP the most exposed lines are Cloud SQL and Memorystore, which are priced off provisioned memory, followed by Cloud Run compute. Load balancer and Cloud Armor fees are the least exposed. If you are budgeting past Q3 2026, add a 10% buffer on the database and cache lines.
What Gets Deployed
A typical tsdevstack project (3 NestJS backends + 1 Next.js frontend) creates these billable resources on GCP:
You can override CPU, memory, instance counts, database tier, Redis tier, and disk size per service in infrastructure.json. See Service Configuration for all available options.
Scenario 1 — Development (Scale-to-Zero)
Backend services and frontend set to minInstances: 0 in infrastructure.json (the default is 1). Kong stays on (minInstances: 1). Messages for the backend services wait in Redis until a request starts them, which is fine for testing. Assumed traffic: ~1,000 requests/day (testing only).
Cold starts after scale-to-zero: 2-8 seconds. Cloud Run handles this natively — no wake-up mechanisms needed.
tsdevstack deploys Kong with cpuIdle: true, which is request-based billing. A minInstances: 1 instance that is not serving requests bills CPU at the reduced idle rate of $0.0000025/vCPU-second rather than the active rate of $0.000024/vCPU-second. In a dev environment the gateway sits idle nearly all month, so an always-on Kong costs far less than a full-rate calculation suggests. Kong's instance has 1.25 vCPU and 1.25 GiB: Kong's own 1 vCPU and 1 GiB, plus 0.25 vCPU and 256 MiB for the collector that sends Kong's spans to Cloud Trace.
Scenario 2 — Production (Always-On, Single Instance)
All services at minInstances: 1 (the default). Assumed traffic: ~100,000 requests/day (3M/month).
Cloud Run has two billing modes: CPU allocated during requests (request-based) and CPU always allocated (instance-based).
- Kong and the frontend use request-based billing. An always-on instance pays memory for the full 730 hours, CPU at the idle rate while waiting, and the active CPU rate only while serving a request. The figures above assume ~3M requests/month at roughly 150ms of CPU each. Slower or heavier requests push these lines up toward the active rate.
- NestJS services with
minInstances1 or more use instance-based billing: CPU and memory for every second, with no per-request fee. Their CPU stays on between requests, so message handlers and background work run while no request comes in. Request-based, the same instance would be ~$13, but it would get CPU only during requests. Services withminInstances: 0keep request-based billing.
Scenario 3 — Production Under Load (3 Instances, 24/7)
Assumed traffic: ~10M requests/day (300M/month). At this volume every service is effectively serving continuously, so CPU bills at the active rate for most of the month. Whether that arrives as 2 saturated instances or 3 at partial load barely changes the bill: what you pay for is total active vCPU-seconds, and traffic sets that.
Cloud Armor bills $0.75 per million requests, so at 300M/month it alone is ~$236, more than the database, cache, and load balancer combined. Together with Cloud Run's $0.40/million, per-request fees are ~$356 of this total. Budget by requests first at this volume.
Traces are per request too. At the default tracing.sampleRate of 1 they are the largest line. Keep 1 in 100 traces ("tracing": { "sampleRate": 0.01 }) and they cost ~$4. See Traces and Dashboards.
Cloud Run's active CPU rate is $0.0864/vCPU-hour, which is 2.1x AWS Fargate's $0.04048. GCP is the cheapest of the three providers when your services sit idle and the most expensive when they are saturated.
Instance-based billing is a flat $0.0648/vCPU-hour, versus $0.0864 while active under request-based billing. NestJS services with minInstances 1 or more already use it. For Kong and the frontend, request-based billing costs more above ~81% utilization. Also consider Cloud Run committed use discounts (up to 17% savings).
Cloud Run Billing, and Why Kong Is Not $70
An earlier version of this page listed Kong at ~$70/month. That came from 730 hrs × ($0.0864/vCPU-hr + $0.009/GiB-hr), which applies Cloud Run's active CPU rate to every second of the month. It is not one of the two rates Cloud Run actually charges.
For 1 vCPU + 1 GiB over 730 hours:
It is reasonable to assume Kong is expensive because every request passes through it. Kong does see 100% of traffic, but that is not what drives the bill. Kong runs with a request concurrency of 1000, and under request-based billing CPU is charged while any request is in flight, not per request. One thousand concurrent requests cost the same CPU-second as one.
So the billed fraction of the month is 1 - e^(-arrival_rate × request_duration), not the sum of request durations:
*Above ~10M requests/day the $0.40/million request charge overtakes compute.
Kong only reaches ~$70 at roughly 5M requests/day sustained, at which point it would have scaled past one instance anyway.
The figures above are for Kong alone. The trace collector on the same instance adds a quarter to each (0.25 vCPU and 256 MiB on top of Kong's 1 vCPU and 1 GiB).
What Drives the Cost
How to Reduce Costs
- Set
minInstances: 0for backend services and the frontend in dev: accept 2-8s cold starts and messages that wait for the next request, and pay near-zero for idle compute. Kong is clamped to at least 1 regardless, and production should stay at 1. See minInstances. - Use
db-f1-microfor dev databases — upgrade only when needed - Right-size CPU/memory: monitor actual usage and lower from defaults if your services don't need 1 vCPU (a NestJS service with
minInstances1 or more needs 1 vCPU or more) - Committed use discounts: a 1-year commitment saves up to 17% on Cloud Run compute
- Lower
tracing.sampleRatein busy production environments: 0.1 keeps 1 trace in 10 and cuts the trace bill by 90%
Override any default in .tsdevstack/infrastructure.json:
See Service Configuration for all available options.
Traces and Dashboards
The trace lines above assume ~8 spans per request (Kong, the service, its database queries). A request that calls more services or runs more queries makes more spans.
tracing.sampleRate sets the share of traces kept, and the trace bill with it. See Traces and Dashboards.
Storage Access Logs
With storage buckets, every read and write of their files is logged: Cloud Storage's Data Access audit logs, in Cloud Logging. Logs of the other buckets in the project (the Terraform state, the SPA buckets) are dropped before they are stored, so they cost nothing.
Example: ~1.5 KB per access (our estimate). A million reads and writes make about 1.5 GB, which fits in the free 50 GiB of most projects. Past it, a million costs about $0.75. Every file counts: a page that shows 20 images from a bucket makes 20 reads.