Scaling a Node.js API on GCP Without Over-Engineering
From a single Cloud Run service to a resilient, observable backend — what to add at each stage of growth, and what to skip until you need it.
By Habib Ur RehmanSenior Full Stack Engineer & MVP Partner- Published
- Updated
- 8 min read

Key takeaways
- Start with one containerised service on Cloud Run and a managed Postgres database.
- Move emails, reports and third-party calls into a Pub/Sub queue with idempotent workers.
- Add Redis caching and structured logging, dashboards and alerts before splitting services.
- Split into services only when a clear boundary and scaling or ownership reason exists.
Teams often reach for Kubernetes and a dozen microservices long before they have the traffic to justify them. Here's the staged approach I use instead.

Stage 1: One service, one database
A containerised Node API on Cloud Run with managed Postgres will carry you surprisingly far. Autoscaling is built in, deploys are one command, and there's almost nothing to operate.
Stage 2: Move slow work off the request path
Emails, report generation and third-party calls belong in a queue. Pub/Sub plus a worker service keeps response times low and makes retries safe and idempotent.

Stage 3: Add caching and observability
- Redis for hot reads and rate limiting.
- Structured logs with a request ID on every line.
- Dashboards and alerts on latency, error rate and queue depth.
Only then: split services
Extract a service when a clear boundary and a clear scaling or team-ownership reason exist, not because it sounds modern. A well-structured monolith is easier to ship, debug and reason about. The SaaS architecture guide shows how I would structure one.
FAQs
Answers on hosting, queues, databases and monitoring as an API grows.
Usually not. Cloud Run autoscaling plus a managed database handles a large amount of traffic, and it removes most operational work. Consider Kubernetes only when you have needs it uniquely satisfies.
Anything slow or unreliable that does not need to finish before the response: sending emails, generating reports, processing uploads and calling third-party APIs. Make jobs idempotent so retries are safe.
When there is a clear domain boundary and a concrete reason such as independent scaling needs or separate team ownership. A well-structured monolith is easier to ship, debug and reason about until then.
Cloud Run runs containers as a managed, autoscaling service (including scaling to zero) with very little operational work, which suits most HTTP APIs. GKE gives more control over networking, scheduling and stateful workloads but needs more operational effort. Start with Cloud Run and move to GKE only when you need what it uniquely offers.
Each running instance opens its own connections, so many instances can overwhelm a Postgres connection limit. Keep per-instance pool sizes small, cap the maximum number of instances (and concurrency where needed), and put a pooler such as PgBouncer between the application and the database.
Pub/Sub is a managed messaging service with at-least-once delivery and easy fan-out to several subscribers. A Redis-based queue such as BullMQ offers richer job features like delays, priorities, retries and rate limiting inside your application. Many teams use Pub/Sub for events between services and BullMQ for application jobs. The SaaS architecture guide includes a BullMQ example.
Write structured JSON logs with a request ID to Cloud Logging, build Cloud Monitoring dashboards and alerts for latency, error rate and saturation, and use Cloud Trace to find slow requests. Alert on symptoms users feel, such as error rate and latency, rather than only on CPU.
References
- What is Cloud Run — Google Cloud
- Pub/Sub overview — Google Cloud
- #Node.js
- #GCP
- #DevOps
Keep reading
SaaS & MVP
Building Scalable SaaS Applications with Next.js and NestJS
A practical architecture guide to building a multi-tenant SaaS with Next.js and NestJS: how the two fit together, how to handle auth, databases, tenancy and background jobs, and what to avoid.
- Published
- 11 min read

Next.js & React
Next.js App Router: Patterns I Reach for on Every Project
Server Components, route groups, streaming and server actions — the handful of patterns that keep my Next.js codebases fast and easy to reason about.
- Published
- Updated
- 8 min read

SaaS & MVP
How I Ship a Production-Ready MVP in Six Weeks
A practical playbook for founders: what to cut, what to keep, and how to sequence the work so you launch fast without building a house of cards.
- Published
- Updated
- 7 min read