Asia VPNAsiaVPNGet app
All posts

Cloudflare vs Supabase, Resend and Trigger.dev: The $5 Stack

10 min read

A typical side project in 2024 looked like this: frontend on Vercel, database and auth on Supabase, email through Resend, background jobs on Trigger.dev, cache and rate limiting on Upstash, plus an OpenAI key, an Anthropic key and a Pinecone index for the "AI" part. Seven dashboards, seven free tiers with seven different kinds of limits, and $10-25 a month each once you upgrade. Before a single user has paid you anything, the bill is already close to $75.

Two years later, nearly every one of those pieces has an equivalent on Cloudflare: one account, declared in one wrangler.jsonc, wired together through bindings instead of API keys, and one bill that starts at $5/month on the Workers Paid plan. Past the included usage you pay as you go, priced per million requests, per billion database rows, per thousand emails.

Developers have started calling it "moving in with Cloudflare", and it really is washing over the small-PaaS market like a wave. This post maps out the picture as of October 2026: how far Cloudflare can replace Supabase, Resend, Trigger.dev and your AI providers, what it actually costs, and - just as important - where it cannot replace them yet, so you do not move house and only then discover there is no bedroom.

Why Cloudflare Is Suddenly Everywhere

Cloudflare is not new. What is new is how fast it has filled the remaining gaps in its developer platform, in roughly a year:

  • November 2025 - announced it would acquire Replicate, bringing a catalogue of 50,000+ AI models to Workers AI.
  • January 2026 - the Astro team joined Cloudflare; the framework stays open source.
  • April 2026, Agents Week - Sandboxes (isolated environments for AI agents) went GA, Email Service opened as a public beta, and Workflows got a rebuilt control plane that runs up to 50,000 concurrent workflows.
  • September-October 2026, Birthday Week - 46 announcements, including AI Search GA, Workers KV Instant (sub-2 ms p99 reads), Auto Router for AI Gateway, and Vinext 1.0 - Next.js on Vite, deployable straight to Workers.

Add the pieces that existed before but have now matured - D1, R2, Durable Objects, Queues, Hyperdrive - and the fact that static assets on Workers are free and unlimited, and hosting the frontend costs next to nothing.

There is one more reason that gets less attention: Cloudflare is designing the whole platform to be driven by AI agents. The new cf CLI launched at Birthday Week covers almost 3,000 API operations (Wrangler covers about 280) and returns JSON meant for machines to read. For a coding agent, one vendor, one CLI and one config file is a far easier environment to work in than seven SDKs and seven dashboards.

The Replacement Map: What Swaps for What

If you useOn CloudflareStatus
Vercel, Netlify (hosting)Workers + Static AssetsGA, assets free
Supabase, Neon (Postgres)D1 (SQLite), or Hyperdrive in front of existing PostgresGA
Supabase Storage, S3R2GA, $0 egress
Supabase Realtime, PusherDurable Objects + WebSocketsGA
Upstash RedisWorkers KV, Durable ObjectsGA
Resend, SendGridEmail ServicePublic beta
Trigger.dev, InngestWorkflows + Queues + Cron TriggersGA
OpenAI/Anthropic SDKs, OpenRouterWorkers AI + AI GatewayGA
Pinecone, home-grown RAGVectorize, AI SearchGA
Supabase Auth, ClerkNothing yet-

The last row is not a typo. The end of this post comes back to it.

Database: How Far D1 Replaces Supabase

D1 is a serverless SQLite database. The $5 plan already includes 25 billion rows read, 50 million rows written and 5 GB of storage per month; beyond that it is $0.001 per million rows read, $1 per million rows written and $0.75/GB-month (Workers pricing). For most small apps, a D1 line item never appears on the bill.

One detail that gets missed: "rows read" means rows the database has to scan, not rows returned. An unindexed query against a 1-million-row table costs 1 million rows read, even if it returns a single result. Indexes in the right places are what keep you inside the allowance.

Limits to know before you move (D1 limits):

  • A maximum of 10 GB per database on Paid (500 MB on Free). In exchange, an account can have up to 50,000 databases, so one database per tenant is a perfectly normal design here.
  • Time Travel restores a database to any point in the last 30 days.
  • This is SQLite, not Postgres: no extensions (pgvector, PostGIS), no Row Level Security, no LISTEN/NOTIFY, looser typing. Moving from Supabase to D1 means rewriting your schema and migrations, not swapping a connection string.

If your app already leans heavily on Postgres, do not force it. Keep Postgres (Supabase, Neon, or PlanetScale - newly integrated at Agents Week) and put Hyperdrive in front of it: it holds a connection pool and caches queries close to your Worker, with unlimited queries on Paid. You still move the compute to Cloudflare without touching the database.

To keep the comparison fair: Supabase Pro is $25/month for 8 GB of disk, 100,000 MAU, 100 GB of file storage and 250 GB of egress. More expensive, but you get real Postgres, auth, a SQL editor and realtime in one package. This is not apples to apples.

Storage: R2 and the "Egress: $0" Line

R2 is S3-compatible, priced at $0.015/GB-month (first 10 GB free), $4.50 per million write operations (Class A) and $0.36 per million read operations (Class B). And the line that matters most: egress is free, at any volume.

Egress is where other providers' bills swell. Supabase Pro includes 250 GB and then charges $0.09/GB; S3 + CloudFront prices by region, and Asia runs about 40% above North America. For an app that serves images, downloads or short video, $0 egress on its own is often reason enough to move.

Email: Email Service vs Resend

Email Service has been in public beta since April 2026 and sends mail directly from a Worker through a binding. The Paid plan includes 3,000 emails/month, then $0.35 per 1,000 emails (Email Service pricing). Receiving mail (Email Routing) is unlimited and free on every plan.

Next to Resend:

Emails/monthCloudflare (on top of the shared $5)Resend
3,000$0$0 (Free, max 100/day)
50,000$16.45$20 (Pro)
100,000$33.95$35 (Pro)

The table makes the point: at 100,000 emails, Cloudflare is barely cheaper. The real advantage is elsewhere - no extra account, API key or invoice, and you pay for the emails you actually sent instead of buying a tier. In return, Resend has been GA for a long time and has a more complete deliverability dashboard and analytics.

One more caveat: the Workers Free plan cannot send email to arbitrary recipients, only to verified addresses in your own account.

Background Jobs: Workflows vs Trigger.dev

Trigger.dev and Inngest sell you durable execution: multi-step jobs where a failed step retries on its own, a job can sleep for days and pick up again, or wait for a webhook. Cloudflare Workflows does exactly that, in TypeScript, inside your Worker:

import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep }
  from "cloudflare:workers";

type Params = { userId: string };

export class Onboarding extends WorkflowEntrypoint<Env, Params> {
  async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
    const user = await step.do("create account", () =>
      createUser(this.env.DB, event.payload.userId),
    );

    await step.do("send welcome email", () =>
      this.env.EMAIL.send(welcomeEmail(user)),
    );

    await step.sleep("wait 3 days", "3 days");

    await step.do("nudge if inactive", () => remindIfInactive(this.env, user));
  }
}

Each step.do result is persisted. If the Worker dies halfway through, the workflow resumes from the unfinished step and does not send the welcome email a second time. Note this.env.DB and this.env.EMAIL: the database and email are bindings, and there is no API key anywhere in the code.

On pricing, Workflows shares the Workers allowance of 10 million requests and 30 million CPU-ms; Paid includes 500,000 steps/month, then $0.80 per 100,000 steps, plus $0.20/GB-month for stored state. For a plain queue there is Queues (1 million operations/month, then $0.40/million); for scheduled jobs there are Cron Triggers.

Trigger.dev has a Hobby plan at $10/month (including $10 of compute credit) and Pro at $50. Where Trigger.dev is still clearly ahead: jobs run in a full Node container, so any npm package, ffmpeg or Puppeteer works, long runs do not hit timeouts, and its dashboard for replaying individual runs is very good.

AI: Workers AI and AI Gateway Instead of Five API Keys

These two get confused with each other.

Workers AI runs open-weight models on Cloudflare's GPUs: 10,000 neurons per day free, then $0.011 per 1,000 neurons. Converted to tokens for easier comparison (Workers AI pricing):

ModelInput ($/1M tokens)Output ($/1M tokens)
Llama 3.1 8B$0.045$0.384
gpt-oss-120b$0.35$0.75
Llama 3.3 70B$0.293$2.253
Kimi K2.5$0.60$3.00

Cheap, and good enough for classification, summarisation, embeddings and data extraction. Do not expect it to replace frontier models for everything.

AI Gateway sits between your app and any model provider: OpenAI, Anthropic, Google, xAI, Groq... The core features (caching, rate limiting, analytics) are free. With Unified Billing, you top up credit in one place on Cloudflare and call those providers' models without an account at each of them. Token prices are the same as buying direct; Cloudflare charges a 5% fee on credit purchases. That is the job OpenRouter does, now on the same invoice as your database.

Birthday Week 2026 added Auto Router: the Gateway classifies each request and routes it to a model that is good enough for the task, instead of always calling the most expensive one. Cloudflare reports savings of up to 30% in its own OpenCode deployment. That is a vendor number, so measure it on your own traffic before believing it.

For RAG there is Vectorize (a vector database) and AI Search (managed RAG, just reached GA): put documents in, get a search API back.

And a Drawer Full of Everything Else

Briefly, because each deserves a post of its own:

  • Durable Objects - stateful objects that can hold WebSockets. This is what replaces Supabase Realtime or Pusher: chat rooms, collaborative cursors, real-time counters. Available on the Free plan too.
  • Workers KV - fast key-value reads at the edge, now with KV Instant. Replaces Upstash for cache, feature flags and sessions.
  • Containers and Sandboxes - for when you need a real Linux machine: running binaries, ffmpeg, or giving an AI agent an isolated place to execute code.
  • Browser Run (formerly Browser Rendering) - headless Chrome for screenshots, crawling, or letting agents browse.
  • Turnstile - a CAPTCHA that does not send users hunting for traffic lights, free.
  • Access - puts admin pages or staging behind a Google/GitHub login, free for up to 50 users. The same mechanism as the protection layer in front of a Cloudflare Tunnel.

Worked Example: What a Small App Pays

Assume a small SaaS that each month has: 3 million API requests (5 ms of CPU on average), a 3 GB database, 50 GB of user uploads, 20,000 transactional emails, a few hundred thousand background job steps, and AI that only uses small models within the free daily allowance.

ItemCloudflareSeparate providers
Hosting + APIInside $5 (3 of 10M requests, 15 of 30M CPU-ms)Vercel Pro $20
3 GB databaseInside $5 (D1)Supabase Pro $25
50 GB files$0.60 (R2: 40 GB x $0.015)Inside Supabase Pro
20,000 emails$5.95Resend Pro $20
Background jobsInside $5 (Workflows)Trigger.dev Hobby $10
Total~$11.55~$75

This table is deliberately rounded and tilts towards Cloudflare in two ways, so to be explicit:

  • The right-hand column buys plans, and those plans include things the left column does not: Supabase Pro comes with auth for 100,000 MAU and real Postgres; Vercel Pro comes with preview deployments and analytics.
  • For a hobby project, all four services on the right have usable free tiers. But Vercel Hobby is non-commercial only, Supabase Free pauses projects after a week of inactivity, and Resend Free caps you at 100 emails a day. Once the app starts making money, you upgrade at each of them in turn.

The real difference is not $11 versus $75, it is the shape of the bill. On the right, a sum of fixed plans, each with its own staircase. On the left, a line that stays almost flat at $5 and only climbs for the thing you use heavily - the same pricing philosophy that won Cloudflare the CDN market.

Where Cloudflare Still Falls Short

This section matters more than every price table above.

No end-user auth. There is no equivalent of Supabase Auth or Clerk: sign-up, sign-in, password reset, OAuth, magic links. Access (attachable directly to a Worker since August 2026) is for locking down internal apps, not for your customers to log in. You will be building it yourself with a library such as Better Auth or Auth.js on top of D1, or continuing to pay Clerk or Supabase Auth. This is the biggest gap on the map.

Workers is not Node.js. nodejs_compat runs most packages, but not native modules; each isolate gets 128 MB of memory; CPU time defaults to 30 seconds and maxes out at 5 minutes per request. Heavy image processing, large PDFs and jobs that run for hours belong in Containers, billed extra per vCPU-second, memory and egress - or back on a cheap VPS, as long as you lock it down in the first 30 minutes.

Beta is still beta. Email Service is a public beta; plenty of Birthday Week launches are beta or have no stated status. Critical transactional email (OTPs, invoices) should have a fallback to another provider ready.

All your eggs in one basket. On 18 November 2025, a faulty Bot Management configuration file made Cloudflare's network serve error pages for most traffic for more than three hours, with full recovery taking almost six; Workers KV, Turnstile and Access were hit too (incident report). When DNS, CDN, compute, database and email all live in one place, their incident is your total outage. On top of that, bindings (env.DB, env.EMAIL, env.AI) are Cloudflare-specific APIs: moving in is easy, moving out means rewriting your whole data access layer.

Pay-as-you-go cuts both ways. Low unit prices do not mean there is a ceiling. An unindexed D1 query inside a loop, a bot scraping your API, a workflow that retries forever - all of it is billed just like real traffic. Set limits.cpu_ms on your Workers, turn on usage-based billing notifications in the dashboard, and add rate limiting from day one.

Should You Move to Cloudflare?

Yes, if you are building a side project, an MVP or a small SaaS; your app reads far more than it writes; your traffic is unpredictable; you serve a lot of files ($0 egress); or you are simply tired of seven invoices. Starting fresh is easiest of all - writing for Workers from day one is much cheaper than porting later.

Not yet, if your app depends heavily on Postgres (RLS, extensions, heavy analytical queries); you need ready-made auth and do not want to build it; you have CPU-heavy or long-running workloads; or your organisation will not accept consolidating DNS, infrastructure and data with a single vendor.

There is also a middle path people rarely mention: you do not have to move everything at once. Put the frontend on Workers first, use R2 for files to cut egress, put AI Gateway in front of your model calls to get logging and caching immediately. Keep Supabase for the database and auth, connected through Hyperdrive. Each step stands on its own, and any step that does not work out is easy to roll back.

The cheapest place to start is that first step: hosting a static site on Workers costs nothing, and is enough to get a feel for the platform before you trust it with your database.


Cover photo by William Veitch on Unsplash.

Keep reading