A head-to-head comparison of Heroku and DigitalOcean App Platform for a backend with an API, a worker, Postgres and scheduled jobs: deploy model, pricing, managed databases, scheduling, platform direction and when the backend should move to your own cloud account.

Heroku runs an app from a Procfile with dynos for the web and worker processes, and add-ons for Postgres and everything around it. DigitalOcean App Platform builds from a repository too and describes the same pieces as components in an app spec, with managed databases next to them.
Both work well for a first backend, and they differ in how add-ons and databases are priced, how scheduled work behaves and which of the two is still getting new features.
Heroku figures are from heroku.com/pricing and DigitalOcean figures from its App Platform pricing page, checked November 26, 2026.
Heroku maps every process type in the Procfile to a dyno formation, so web, worker and release each get their own size and count, and heroku ps:scale changes them without touching code. Add-ons attach a service to the app and write its connection string into the config vars, which is why a Postgres database, a Redis instance and a log drain all feel like one product. The newer Fir generation runs on Kubernetes and requires a Private Space, while Cedar remains the default.
App Platform describes an app as components in one app spec: services, workers, static sites, and jobs that run before or after a deploy or on a schedule. The spec lives in YAML next to the code or in the control panel, and it deploys as a unit. Outside App Platform, Droplets, managed Kubernetes and Spaces object storage live in the same account, which gives a growing backend somewhere to go without leaving DigitalOcean.
Heroku bills dynos by the month, with Eco at $5 and sleeping after 30 minutes of inactivity, Basic at $7 and always on, and Standard-1X and Standard-2X at $25 and $50 with horizontal scaling and preboot. Heroku Postgres starts at $5 for the shared Essential-0 plan and moves to dedicated Standard-0 at $50 a month, with 4 GB of RAM and 120 connections.
App Platform prices each component by container size, from $5 for the fixed shared container up to $50 for 2 vCPUs and 4 GiB, with an outbound transfer allowance per container and $0.02 per GiB beyond it. A development database costs $7, can only be used by the app it belongs to and is not backed up by default, so production data goes in a DigitalOcean managed PostgreSQL cluster, which includes daily backups with point-in-time recovery for the previous seven days and standby nodes with automatic failover.
A Heroku worker dyno is the same code in a different process type, usually reading from Redis through Sidekiq, BullMQ or Celery, and Heroku Scheduler runs one-off dynos at 10-minute, hourly or daily intervals. Heroku documents the Scheduler as best effort, so jobs that must run every time tend to move to a clock process that stays up.
App Platform has worker components for the queue consumer and scheduled jobs defined by a cron expression in the app spec, billed only while they run. Neither platform includes a managed message queue, so the worker still polls Redis or Valkey, and retries, backoff and dead-letter handling are application code on both.
Salesforce stopped selling Enterprise Heroku subscriptions to new customers in February 2026, and Heroku is now in sustaining engineering, focused on stability, security and support rather than new features. Existing credit-card customers keep the same pricing and service, so a working app has no deadline, but a team starting a multi-year project has to weigh that against a platform that continues to add features.
Encore is a backend framework with built-in infrastructure, and it takes the Heroku or App Platform workload, the web process, the worker, the database and the schedule, and runs it as services in your own AWS or GCP account. The AWS docs list Fargate, RDS and SNS with SQS, and the GCP docs list Cloud Run, Cloud SQL and Pub/Sub. If you want to stay on DigitalOcean for now, encore build docker produces an image that the DigitalOcean guide deploys to App Platform.

Run in your terminal to get started locally.
A web dyno, a worker dyno and a scheduler entry become one service. The receipts folder also needs an encore.service.ts that exports new Service("receipts"). The route stores an order and publishes an event, the subscriber plays the part of the worker, and a cron job does what the scheduler add-on did. The subscriber claims each receipt with a conditional UPDATE, since Pub/Sub delivers at least once:
// receipts/receipts.ts
import { api, APIError } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
import { Topic, Subscription } from "encore.dev/pubsub";
import { CronJob } from "encore.dev/cron";
import log from "encore.dev/log";
// Replaces the Heroku Postgres add-on or the DigitalOcean managed database.
const db = new SQLDatabase("receipts", { migrations: "./migrations" });
interface OrderPlaced {
orderId: number;
email: string;
}
// Replaces the Redis queue between the web process and the worker.
export const orderPlaced = new Topic<OrderPlaced>("order-placed", {
deliveryGuarantee: "at-least-once",
});
// Replaces the web dyno or web service route.
export const placeOrder = api(
{ expose: true, method: "POST", path: "/orders" },
async ({ email, totalCents }: { email: string; totalCents: number }): Promise<{ id: number }> => {
if (!email.includes("@") || totalCents <= 0) {
throw APIError.invalidArgument("email and a positive total are required");
}
const row = await db.queryRow<{ id: number }>`
INSERT INTO orders (email, total_cents) VALUES (${email.toLowerCase()}, ${totalCents})
RETURNING id`;
await orderPlaced.publish({ orderId: row!.id, email });
return { id: row!.id };
},
);
// Replaces the worker dyno or worker component.
const _ = new Subscription(orderPlaced, "send-receipt", {
handler: async (event) => {
const claimed = await db.queryRow<{ id: number }>`
UPDATE orders SET receipt_sent_at = now()
WHERE id = ${event.orderId} AND receipt_sent_at IS NULL
RETURNING id`;
if (!claimed) return;
log.info("send receipt", { orderId: event.orderId, email: event.email });
},
});
// Replaces Heroku Scheduler or a scheduled job component.
export const purgeUnpaid = api(
{ expose: false },
async (): Promise<{ deleted: number }> => {
const row = await db.queryRow<{ deleted: number }>`
WITH gone AS (
DELETE FROM orders
WHERE paid_at IS NULL AND created_at < now() - interval '7 days'
RETURNING 1
)
SELECT count(*)::int AS deleted FROM gone`;
return { deleted: row?.deleted ?? 0 };
},
);
const __ = new CronJob("purge-unpaid", {
title: "Delete unpaid orders after 7 days",
schedule: "0 4 * * *",
endpoint: purgeUnpaid,
});
-- receipts/migrations/1_create_orders.up.sql
CREATE TABLE orders (
id BIGSERIAL PRIMARY KEY,
email TEXT NOT NULL,
total_cents INTEGER NOT NULL CHECK (total_cents > 0),
paid_at TIMESTAMPTZ,
receipt_sent_at TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
encore run starts Postgres locally, applies the migration and runs the topic and subscriber in process, so the web and worker flow works on a laptop without a Procfile, Redis or an app spec. Cron jobs do not run locally, and you test purgeUnpaid by calling it from the local development dashboard. When you push, Encore provisions Fargate, RDS and SNS with SQS in your AWS account, or Cloud Run, Cloud SQL and Pub/Sub on GCP, as the infrastructure docs list, and the Pub/Sub docs cover retries and the dead-letter queue. The cron schedule is managed by the Encore platform, so no scheduler add-on or extra cloud resource sits behind it.
An AI coding agent working in this repository can add a second subscriber or another schedule in the same file and run it locally before review, instead of changing a Procfile, an app spec and a dashboard separately.
Best fit: Teams that want the push-to-deploy workflow with the database, the queue and the schedules running as services in their own AWS or GCP account.
Choose Heroku for an existing app that works and relies on its add-on ecosystem or on Heroku Connect with Salesforce, and DigitalOcean App Platform for a smaller bill on a new app, with Droplets and Kubernetes available in the same account later. When the project needs a managed queue, private networking in your own VPC, or a platform that keeps adding features, run the backend in your own AWS or GCP account instead.
For a small always-on app it usually is. App Platform lists a fixed shared container with 1 vCPU and 512 MiB at $5 a month, while an always-on Heroku Basic dyno with 0.5 GB is $7. At production sizes the gap depends on databases, because Heroku Postgres Standard-0 is $50 a month and a DigitalOcean development database is $7 with no backups by default.
Not as a marketplace. App Platform attaches DigitalOcean managed databases, and everything else, such as a queue or an error tracker, is a separate service you create and connect through environment variables. Heroku add-ons provision the service and inject its config vars into the app.
For an existing app that works, yes. Heroku moved to sustaining engineering in February 2026, which means a focus on stability, security and support rather than new features, and credit-card customers keep the same pricing and service. New projects that need features beyond dynos and add-ons usually look elsewhere.
With Encore you declare the API, the Postgres database, the Pub/Sub topic for the worker and the cron job in the service code. Encore provisions them in your own AWS or GCP account, and encore run starts the same pieces on a laptop, so the Procfile or app spec is replaced by code.
Own your AWS or GCP cloud without giving up PaaS speed
Define databases, Pub/Sub, cron jobs, and object storage directly in TypeScript or Go. Encore provisions everything in your own cloud account with zero Terraform or lock-in.