Deploying to the Cloud
"The cloud" is a broad term, but for deploying a Node app it comes down to a handful of patterns: PaaS (platform-as-a-service) platforms that take your code or container and run it for you, container orchestration services that run your Docker images at scale, and managed infrastructure (load balancers, managed databases, CDNs) that handles the operational work you don't want to do yourself. This page surveys the major options — Render, Railway, Fly.io, AWS, GCP, Azure — what each is best at, and the universal deployment practices that apply across all of them.
PaaS — fastest path to production
Platform | Standout strength | Notes |
|---|---|---|
Render | Simple, predictable pricing; Docker and Git deploys | Good all-rounder; free tier available |
Railway | Instant deploys, great DX, provisioned databases | Generous free tier; fast iteration |
Fly.io | Global edge deployment, Docker-first, latency-sensitive apps | More ops surface than Railway/Render |
Heroku | The original PaaS; very mature ecosystem | More expensive than newer entrants |
Container platforms — AWS, GCP, Azure
Service | Platform | What it is |
|---|---|---|
ECS / Fargate | AWS | Run Docker containers serverlessly or on managed EC2 |
App Runner | AWS | PaaS-like; auto-scales containers from a registry |
Cloud Run | GCP | Serverless containers; scales to zero; per-request billing |
Azure Container Apps | Azure | Serverless containers with Dapr and KEDA integration |
EKS / GKE / AKS | All three | Managed Kubernetes for full orchestration control |
Universal deployment practices
Build once, deploy the same artifact everywhere — build the Docker image once in CI, push to a registry, deploy that exact image to staging and production (not rebuild-per-env).
Never build in production — production servers should run a pre-built, tested image;
npm install+ compile at deploy-time is slow and risky (a broken registry or transient network issue takes down your deploy).Use managed databases and caches — let the cloud provider handle Postgres/Redis backups, patching, and HA rather than running them in your own containers in production.
Set
NODE_ENV=productionand all secrets via the platform's environment variable / secrets store — never bake them into the image.Configure health checks on the platform — so it restarts unhealthy instances and stops routing to them during deploys.
Enable autoscaling — set min/max instance counts and a CPU/concurrency metric to scale on; let the platform handle traffic spikes.