Nov 18, 20266 min read

Heroku vs Vercel for Backend Apps

How Heroku dynos and Vercel Functions compare for running a backend: process model, workers and cron, Postgres, pricing in November 2026, and what Heroku's maintenance mode changes, with a TypeScript backend that deploys to your own AWS or GCP account instead.

Illustration for Heroku vs Vercel for Backend Apps

Heroku and Vercel both deploy on git push, but they run a backend in different shapes. Heroku runs your app as long-lived processes called dynos, and Vercel runs it as functions that scale per request and bill for active CPU time.

That difference decides how workers, cron jobs, long requests and databases work on each. This guide compares the two for backend APIs as of November 2026, including Heroku's February 2026 move to a sustaining engineering model, and ends with Encore for running the same backend in your own AWS or GCP account.

Heroku vs Vercel at a glance

HerokuVercel
Runtime modelAlways-on dynos, web and worker process typesVercel Functions on Fluid compute, scaled per request
Long workNo duration limit on worker dynos300s default, 800s maximum on Pro
Background jobsWorker dynos, Heroku SchedulerVercel Queues (beta), Schedules and Cron Jobs
DatabaseHeroku Postgres, Essential-0 from $5 a monthMarketplace providers such as Neon and Supabase
Entry priceBasic dyno $7 a month, Standard-1X $25Hobby $0, Pro $20 a month with $20 usage credit
Compute billingPer dyno per monthActive CPU from $0.128 per hour, memory from $0.0106 per GB-hour
ContainersDocker deploys, Fir generation on KubernetesContainer Runtime (beta) from a Dockerfile
Product directionSustaining engineering since February 2026Active development

Prices are from the Heroku pricing page and the Vercel pricing page, checked on November 18, 2026. Function limits are from Vercel's Functions limits.

Process model: dynos versus functions

A Heroku app defines process types in a Procfile, such as web: node server.js and worker: node worker.js, and each runs on its own dynos. An Eco dyno at $5 sleeps after 30 minutes of inactivity, Basic at $7 stays on, and Standard-1X at $25 and Standard-2X at $50 add horizontal scaling and metrics. A process can hold database connections, keep in-memory state and run as long as it likes.

On Vercel, each route becomes a function, and Fluid compute lets one instance serve many concurrent requests and bills CPU only while code runs, which suits I/O-heavy APIs that wait on a database or an LLM. The limits are duration (800 seconds on Pro), 4 GB of memory on Pro and a 250 MB uncompressed bundle, and state does not survive between instances.

Workers, queues and cron

Heroku's answer to background work is a worker dyno reading from a queue, often Redis through Heroku Key-Value Store, and Heroku Scheduler for periodic tasks. Vercel's answer is Vercel Queues, marked Beta in the docs, which push messages to a function with retries, and Cron Jobs, which Vercel now calls legacy in favor of Schedules. On Hobby, cron jobs can only run once per day, per Vercel's cron usage docs.

Databases

Heroku Postgres is part of the platform, with Essential plans from $5 a month and the newer Postgres Advanced tier with separate storage and compute. Vercel has no first-party Postgres anymore: Vercel Postgres moved to Neon in December 2024, and the Marketplace provisions Neon, Supabase, Prisma Postgres or Aurora Postgres and injects the connection string.

What Heroku's maintenance mode means

On February 6, 2026, Heroku announced a sustaining engineering model with no new enterprise contracts for new customers. Existing apps keep running and Heroku still ships fixes such as Postgres migration tooling, but choosing Heroku for a new backend now means planning an exit later. The end of Heroku guide covers the timeline.

How does Encore compare to Heroku and Vercel?

Encore

Encore is a backend framework with built-in infrastructure for TypeScript and Go. It keeps the git push workflow from both platforms, but the database, queue and cron job are declared in the code and provisioned in your own AWS or GCP account: RDS, SNS and SQS on AWS, or Cloud SQL and Pub/Sub on GCP. The web process and the worker from a Heroku Procfile become an API and a subscription in the same service.

Application code passes through Encore and infrastructure guardrails to resources provisioned in your own AWS or GCP account.
Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

import { api } from "encore.dev/api"; import { SQLDatabase } from "encore.dev/storage/sqldb"; import { Topic, Subscription } from "encore.dev/pubsub"; import { CronJob } from "encore.dev/cron"; // Provisioned as RDS on AWS or Cloud SQL on GCP. const db = new SQLDatabase("reports", { migrations: "./migrations" }); interface ReportRequested { reportId: number; } // SNS and SQS on AWS, Pub/Sub on GCP. export const requested = new Topic<ReportRequested>("report-requested", { deliveryGuarantee: "at-least-once", }); export const create = api( { expose: true, method: "POST", path: "/reports" }, async (p: { accountId: string }): Promise<{ id: number }> => { const row = await db.queryRow<{ id: number }>` INSERT INTO reports (account_id) VALUES (${p.accountId}) RETURNING id`; await requested.publish({ reportId: row!.id }); return { id: row!.id }; }, ); // The work a Heroku app would run on a worker dyno. new Subscription(requested, "build-report", { handler: async (msg) => { await db.exec`UPDATE reports SET status = 'done' WHERE id = ${msg.reportId}`; }, }); export const cleanup = api({}, async (): Promise<void> => { await db.exec`DELETE FROM reports WHERE created_at < now() - interval '30 days'`; }); // Scheduled by the Encore platform, replacing Heroku Scheduler. new CronJob("cleanup-reports", { title: "Delete reports older than 30 days", every: "24h", endpoint: cleanup, });

encore run starts the API, the subscription and a local Postgres, so the worker runs on your machine the way it runs in the cloud. The cron job is scheduled by the Encore platform once deployed and does not fire locally, as the cron jobs docs note. The databases and Pub/Sub docs cover migrations and delivery, and connecting your own cloud covers the AWS and GCP setup. Encore has migration guides from Heroku and from Vercel.

A coding agent that adds a worker or a scheduled job writes a few lines of TypeScript, and the next deploy provisions the queue in your account, with no Procfile, add-on or vercel.json to keep in sync.

Best fit: TypeScript or Go backends that need workers, queues and Postgres in your own AWS or GCP account, with a git push deploy like Heroku or Vercel.

How to choose

Pick Heroku if you already run there and the app is stable, while you plan where it goes next. Pick Vercel when the backend is a set of request handlers next to a frontend, and long jobs fit inside 800 seconds or a queue. Pick Encore when the backend has workers, cron and a database and you want them in your own AWS or GCP account.

Frequently asked questions

Is Vercel or Heroku better for a backend API?

Heroku is better for a classic long-running backend: a web process, worker processes and Heroku Postgres in one app, billed per dyno. Vercel is better when the backend is a set of request handlers next to a Next.js or other frontend, billed by active CPU and memory. Long jobs, steady background workers and a built-in database point to Heroku's model, and Heroku has been in a sustaining engineering model since February 2026.

Can Vercel run background workers like Heroku worker dynos?

No. Vercel Functions have a 300-second default duration with an 800-second maximum on Pro, and Vercel Queues, marked Beta in the Vercel docs in November 2026, deliver messages to functions with retries. Heroku worker dynos are always-on processes with no duration limit, which suits consumers that hold connections or run for hours.

Does Vercel have a database like Heroku Postgres?

No. Vercel Postgres was moved to Neon in December 2024, and new projects install a Postgres provider such as Neon, Supabase or Aurora Postgres from the Vercel Marketplace. Heroku Postgres is Heroku's own managed database, starting at $5 a month for Essential-0.

What should I use instead of Heroku or Vercel to run a backend on AWS or GCP?

Encore is a backend framework with built-in infrastructure for TypeScript and Go. You declare databases, Pub/Sub topics and cron jobs in code, and pushing to git provisions RDS, SNS and SQS on AWS, or Cloud SQL and Pub/Sub on GCP, in your own cloud account.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders