Skip to content
Ask for a Budget
EngineeringAugust 6, 202618 min readUpdated on November 11, 2026

Serverless stack for an MVP: Cloudflare, Supabase and Resend

Prices, real limits and pitfalls of a serverless MVP stack in 2026 (Cloudflare Workers, Supabase, Resend): cost simulation, lock-in and migration triggers.

Serverless stack for an MVP: Cloudflare, Supabase and Resend
Índice do artigo
faltam 17 min de leitura

One-sentence summary: a product's initial infrastructure should optimize for validation speed, not for a hypothetical scale that may never come, and in 2026 a serverless stack puts an MVP live for around US$ 37 to 65 per month, with production and staging, versus about US$ 73 a month that a managed Kubernetes cluster charges for the control plane alone, before the first node.

Every architecture meeting for a new project goes through the same question: how much infrastructure does this product really need on day one? The traditional answer involves a cloud account, machines, runners, containers and an orchestrator. The answer gaining ground involves three managed services, a connected repository and a deploy that happens in seconds.

This article compares the two with numbers checked in official sources on August 6, 2026, and treats the uncomfortable side with the same rigor: where serverless breaks, how much lock-in really exists and what the objective triggers for migrating are.

Article summary

  • Cloudflare Workers Paid costs US$ 5 per month with 10 million requests included, serves static files for free and does not charge for outbound bandwidth. R2 has zero egress versus US$ 0.09 per GB on Amazon S3.
  • Supabase Pro costs US$ 25 per month, but billing is per organization and the included compute credit covers only one instance with 1 GB of RAM. A realistic MVP with production and staging comes to between US$ 37 and 65 per month: the top of the range is the full scenario, with Resend Pro and paid staging.
  • The Supabase free plan pauses the project after one week of inactivity and has no automatic backup, which rules it out for anything with customer data.
  • Lock-in is asymmetric: database, RLS and vectors are plain, portable Postgres, while Realtime, Durable Objects, D1 and KV require a rewrite. And the documentation for leaving Supabase comes from a competitor, not from Supabase itself.

The math almost nobody does at the start

Before comparing platforms, it is worth pinning down the floor of the traditional path. The three big managed Kubernetes providers have converged on the same control plane price: US$ 0.10 per cluster per hour on Amazon EKS, Google GKE and the Standard tier of Azure AKS. That is about US$ 73 per month before any node, before a database, before a load balancer and before the first line of code runs.

There are two exceptions almost nobody knows about: the AKS Free tier does not charge for the control plane, at the cost of having no financially backed SLA, and GKE offers US$ 74.40 per month in credits that cover one zonal or Autopilot cluster per billing account.

US$ 73Control plane per month, before the first node
US$ 5Cloudflare Workers Paid, 10 million requests

The point is not that Kubernetes is too expensive. It is that it charges for an operational capacity that a product not yet validated does not use. Paying for elasticity you will not exercise and for isolation you do not need yet is the opposite of optimizing for validation.

The stack in three pieces

Cloudflare WorkersStatic files, server-side rendering and API routes, running close to the user
Cloudflare R2Files and media, compatible with the S3 API and with no outbound charges
database queries through the pooler
SupabaseManaged Postgres with authentication, storage, RLS and pgvector in the same database
ResendTransactional email: invitations, password recovery and notifications

The logic of this setup is to reduce the number of pieces the team operates. One platform handles the edge and files, one handles data and identity, one handles email. None requires provisioning machines, configuring networks or keeping an operating system up to date.

Cloudflare: what the limits really allow

The free plan is generous in volume and restrictive in processing, and that distinction is what confuses people most.

LimitWorkers FreeWorkers Paid
PriceUS$ 0
Requests100,000 per day
CPU time10 ms per invocation
Subrequests50 per request
Bundle size3 MB compressed
Static files20,000 per Worker

Source: official Cloudflare Workers limits and pricing documentation, read on August 6, 2026.

Three details change the project:

The CPU limit does not count network waiting. HTTP calls, cache reads and database queries do not consume CPU time. The free plan's 10 ms looks impossible until you realize that a route that only fetches data and returns JSON uses far less than that. What blows past 10 ms is heavy server-side rendering, cryptography and image processing.

Requests for static files are free and unlimited. Only invocations of the Worker script are billed. A content site generates practically no cost.

Cloudflare stated in 2025 that all investment goes to Workers, not Pages. Pages is still supported, but the official recommendation for new projects is to start with Workers, which today serves static files and server-side rendering in the same product. It is worth following that direction instead of starting on a product in strategic maintenance mode.

And the platform's strongest economic argument is not in compute, but in file storage:

ItemCloudflare R2 StandardAmazon S3 Standard
Storagetiers by volume and region
Class A operations (write, list)US$ 5.00 per million
Class B operations (read)US$ 0.40 per million
Outbound to the internet100 GB per month allowance aggregated across the account, then billed per GB
Free tierdepending on the new account program

Source: official Cloudflare R2 and Amazon S3 pricing pages, read on August 6, 2026. The AWS outbound price per GB above the allowance is in the data transfer table, which varies by region.

The difference in operations is marginal. The headline is outbound transfer: for a product that serves media, reports or downloads, egress is the line that blows up the bill without warning, and it is also the cost that locks you in the most, because leaving a cloud that charges for outbound transfer means paying to take your own data away.

A note on precision: R2 does not charge egress in any class, but the Infrequent Access class charges for data retrieval per GB. If your case is archive data accessed now and then, compare retrieval, not just storage.

Supabase: why the bill is not US$ 25

Supabase delivers in a single service what normally takes four: managed Postgres, authentication, file storage and vector search. The Pro plan costs US$ 25 per month, and this is where a hasty reading goes wrong.

Two documented details reinforce this: the compute credit does not cover read replicas or branching, and compute is billed per started hour, even if the project runs for only a few minutes. In other words, the most important component of the stack, the database, does not scale to zero.

The compute ladder is the cost that shows up later, and it is about memory, not storage:

InstanceRAM and approximate cost per month
Micro1 GB, about US$ 10 (covered by the Pro credit)
Small2 GB, about US$ 15
Medium4 GB, about US$ 60
Large8 GB, about US$ 110

Source: Supabase pricing page and compute and disk documentation, read on August 6, 2026.

The quotas included in Pro are generous for an MVP: 8 GB of disk per project, 100 GB of storage, 250 GB of egress and 100,000 monthly active authentication users. Overage is predictable: US$ 0.125 per GB of disk, US$ 0.09 per GB of egress and US$ 0.00325 per extra active user.

The free plan is for prototypes, not for a live product

It is worth being direct, because this mistake is expensive:

  • the project is paused after one week of inactivity, exactly the scenario of an MVP that sits idle waiting for the investor meeting;
  • there is no automatic backup on the free plan;
  • the limit is a 500 MB database, 1 GB of storage and two active projects per organization;
  • Point-in-Time Recovery is a paid add-on that costs US$ 100 per month for seven days of retention, which doubles the bill of a small Pro plan.

The rule we use: prototypes and learning can live on the free plan; nothing with real customer data starts outside Pro.

Vectors and search: what is true and what is marketing

Supabase is a technically good choice for RAG, but not for the reason usually sold. What is strong is hybrid search in plain SQL: Postgres native full text search with a GIN index, combined with pgvector using an HNSW index, and the two rankings merged by Reciprocal Rank Fusion in a single query. This replaces an architecture of Postgres plus a vector database plus a search engine with just one database.

What does not exist is managed embedding. Automatic embedding generation in Supabase is an implementation recipe, assembled with a trigger, a queue, a scheduler and an edge function, not a ready-made feature. Anyone promising "automatic RAG" is selling documentation as a product.

Resend: chosen for experience, not price

The third component is the easiest to choose and the easiest to justify wrongly. Resend has the best developer tooling in its category, with simple integration into modern stacks, and the free plan covers 3,000 emails per month with a cap of 100 per day.

What it is not: the cheapest. Amazon SES delivers a thousand emails for about US$ 0.10, and the difference at volume is an order of magnitude. The full comparison, with the free tiers that remain in 2026 and the price floor per volume range, is in transactional email: the free and the cheapest providers.

Two pitfalls of the free plan deserve attention: the cap is 100 emails per day, not just 3,000 per month, so a batch onboarding send hits the daily limit before the monthly one. And each address in recipient, CC and BCC counts separately.

The honest decision is this: at the start, email cost is irrelevant and integration time is not. An MVP that sends 2,000 emails per month pays zero with any provider on the list, and the engineering hour saved is worth more than the difference in cents. When volume grows, switching email providers is one of the cheapest migrations there is, because the integration surface is small.

Cost simulation: a real B2B SaaS

Scenario: a B2B product with 300 client companies, about 2,000 active users per month, 1.5 million requests per month, a 6 GB database, 40 GB of files and 15,000 transactional emails per month. Production and staging environments.

ItemMonthly cost
Cloudflare Workers Paid (1.5 M of 10 M included)US$ 5.00
Cloudflare R2 (40 GB, 10 GB free, zero egress)US$ 0.45
Supabase Pro (organization)US$ 25.00
Compute: production on Small, above the US$ 10 creditUS$ 5.00
Compute: staging project on MicroUS$ 10.00
Resend Pro (15,000 emails)US$ 20.00
TotalUS$ 65.45

Official prices read on August 6, 2026 and rechecked on November 11, 2026 (Workers, R2, Supabase, Resend and SES unchanged). Convert at the day's exchange rate before approving a budget.

This is the top of the range, with Resend Pro and paid staging. Swapping Resend for Amazon SES, at US$ 0.10 per thousand emails, the total drops to about US$ 47. If, in addition, staging goes to a free plan project, which can tolerate being paused, it drops to about US$ 37, the bottom of the range. And the same product running on a managed cluster would start at US$ 73 for the control plane alone, without nodes, without a database and without a load balancer.

The difference in money is relevant. The difference in time is bigger: this stack goes live on day one, and the other consumes a week of configuration that the product did not need to pay for yet.

Where serverless breaks

None of these platforms is neutral about the shape of your application. Some workloads simply do not fit, and knowing them in advance avoids finding out late.

  1. Long processing: Supabase edge functions have a ceiling of 400 seconds of total time on paid plans and only 2 seconds of CPU per request. Processing a large spreadsheet, generating a heavy report or running an import does not fit.
  2. Intensive CPU on the free plan: the 10 ms of CPU per invocation on Workers Free rules out heavy server-side rendering and cryptography. The paid plan solves it, the free one does not.
  3. Fan-out of external calls: a Worker accepts at most six simultaneous connections waiting for a response per invocation. A route that queries eight APIs in parallel needs to be rewritten in batches.
  4. Heavy concurrent writes: each D1 database is single-threaded and processes queries in sequence: a 100 ms query limits the database to about ten per second. Worse, D1 charges for rows scanned, not rows returned: a query without an index on a 5,000-row table counts 5,000 reads, even if it returns ten. A poorly indexed listing screen consumes the daily allowance on its own. For the product's domain, Supabase's Postgres is the right place; D1 is for edge data and simple reads.
  5. Persistent connections: long-lived websockets, your own queue and a worker that stays alive waiting for work call for another architecture, either Durable Objects or a container.
  6. Libraries that depend on full Node: Workers implements a subset of Node. Modules such as http2, vm, cluster and domain exist only as stubs, and any dependency that needs a real file system or child processes will not run.

Execution ceilings, side by side

The time limit is what decides whether a process fits on the platform or not. It is worth having the table at hand before promising a feature to a client.

PlatformExecution ceiling
Cloudflare WorkersUnlimited total time while the client is connected; 10 ms of CPU on free and up to 5 min on paid; 15 min for cron and queues
Supabase Edge Functions150 s on free and 400 s on paid, with 2 s of CPU and 256 MB of memory
AWS Lambda900 s (15 min), 6 MB synchronous payload
Vercel Functions300 s on Hobby, 800 s on Pro, 4.5 MB payload
Netlify Functions60 s synchronous, 15 min in background
Google Cloud Run300 s default, up to 60 min for services; jobs accept up to 168 h

Source: official documentation of each platform, read on August 6, 2026.

Two practical takeaways. First: if your longest process takes more than 15 minutes, the only platform on the list that solves it without moving to a machine is Cloud Run in job mode. Second: the maximum payload rules out uploading large files through the function on almost all of them, so the correct pattern is for the client to send directly to storage with a signed URL.

On cold starts, honesty is in order: there is no published independent, reproducible measurement that backs up the millisecond tables going around. What can be stated is what the companies themselves write: Cloudflare says an isolate loads in under 5 ms and that it pre-warms the Worker during the TLS handshake, and AWS describes SnapStart as a reduction to under one second in optimal scenarios, not as eliminating the problem. AWS itself notes that cold starts typically occur in under 1% of invocations, which helps calibrate the real size of the concern.

The number one gotcha: connection pooling

This is the most common incident for teams launching a serverless MVP, and it has a documented solution. A serverless environment opens many short connections, and a Supabase Micro instance supports only 60 direct connections, versus 200 through the pooler.

The rule is short: the application uses the pooler in transaction mode on port 6543, and migrations use the direct connection on 5432. Transaction mode does not support prepared statements, and that is what breaks when someone forgets the parameter.

# Serverless application: pooler in transaction mode
DATABASE_URL="postgresql://...@...:6543/postgres?pgbouncer=true"

# Migrations and schema tools: direct connection
DIRECT_URL="postgresql://...@...:5432/postgres"

With Drizzle, the equivalent is passing prepare: false to the client. Pointing the application at 5432 brings the database down through connection exhaustion; pointing it at 6543 without turning off prepared statements breaks in production with a hard-to-read error.

Egress and data residency: the math changes in Brazil

This is the point almost no international comparison covers and that changes the decision for anyone serving Brazilian customers. Hosting in Brazil due to data residency requirements costs considerably more in outbound transfer.

Outbound to the internet, first tierNorthern VirginiaSão Paulo
AWS, up to 10 TB per monthUS$ 0.090 per GBUS$ 0.150 per GB
Google Cloud Premium Tier, up to 1 TiBUS$ 0.12 per GiBUS$ 0.19 per GiB
Vercel, Fast Data Transfer after 1 TBdepending on regionUS$ 0.22 per GB
Cloudflare R2no chargeno charge

Source: AWS Price List API, AWSDataTransfer offer, published July 20, 2026, checked on August 6, 2026; Google Cloud's official network pricing announcement; Vercel's pricing page. AWS's HTML tables are rendered by JavaScript and do not expose these tiers, which is why the correct source is the pricing API, not the marketing page.

On AWS, the first tier in São Paulo costs about 67% more than in Northern Virginia. Vercel also separately charges for CDN transport to the function, which in the São Paulo region comes to US$ 0.41 per GB with no allowance, so "it's X times more expensive" comparisons need to say what is being measured.

It is also worth knowing that there is a documented exit door: since March 2024, AWS waives the transfer fee for customers migrating out, upon request and approval per account, with a 90-day deadline to complete. It is not automatic, but it exists.

What the law requires, in practice

Data residency in Brazil is often treated as an absolute legal obligation, and that is not what the LGPD (Brazil's data protection law) says. Article 33 allows international transfer under nine conditions, and ANPD Board Resolution No. 19, of August 23, 2024 (ANPD is Brazil's data protection authority), regulated the mechanisms: adequacy decision, standard contractual clauses, equivalent clauses, specific clauses and binding corporate rules. Standard clauses must be adopted without modification, and the period for adapting contracts has already ended.

The detail that changes vendor selection: as of August 2026, the only adequacy decision issued by the ANPD recognizes the European Union, through Resolution No. 32, of January 2026, covering 30 jurisdictions. The United States does not have a Brazilian adequacy decision, which means that using a vendor with data on US soil requires backing the transfer with standard contractual clauses, not adequacy.

In other words: hosting outside Brazil remains legal and common, as long as the contract with the vendor carries the right instrument. The question for the legal team is not "where is the data", it is "which Article 33 mechanism supports this transfer".

Lock-in: what is reversible and what is not

Here is the part usually treated as a slogan ("it's open source, just migrate") that deserves precision. Lock-in in this stack is not uniform; it has three layers.

LayerPortablePortable with workRequires rewrite
DataFile storage, which goes to S3 or R2Realtime
IdentityToken issuing and validation, which moves to another serviceFlows coupled to the SDK on the front end
EdgeR2, compatible with the S3 APIDurable Objects, D1 and KV

Three observations that change the reading:

RLS is plain Postgres. Row-level security policies are not a platform feature, they belong to the database. They travel in the dump. This is the strongest argument in favor of the choice: the most valuable part of the system, the data model with its access rules, is standard.

The edge runtime is open. The engine that runs Workers is published under the Apache 2.0 license and runs outside Cloudflare, and the concept of a compatibility date lets you lock the API version during a migration. The Worker code is portable; what locks you in are the state services.

Exit documentation is asymmetric, and that says a lot. There is plenty of official documentation for getting into these platforms and almost none for getting out. Supabase documents migrating to Supabase and migrating from its cloud to its own self-hosted version, but not to a third-party managed Postgres. The guide for leaving Supabase is published by a competitor, and that guide covers only the main schema, without addressing authentication, storage, realtime, extensions or access policies.

pg_dump is the easy part of the migration. What gets stuck is everything that is not a table.

Engineering and applied AI team, X-Apps

It is also worth being careful with the word "open source", because it does not mean the same thing for every competitor: Supabase is Apache 2.0 and PocketBase is MIT, both truly permissive, while some competitors use licenses that prohibit competing with the product and only convert to an open license in the future. And the self-hosted version of Supabase runs only one project and does not include branching, advanced metrics, managed backups, point-in-time recovery or the management API. "Just self-host it" transfers to your team exactly what you were paying for.

The counterweight: who left the cloud and what it really proves

Three cases come up in every serverless discussion, almost always with the wrong conclusion. It is worth putting each one in proportion.

37signals cut its annual cloud spend from US$ 3.2 million to US$ 1.3 million, with about US$ 700,000 invested in its own hardware, and projects savings of around US$ 10 million over five years. It is the best-documented case there is. It is also the case of a company with mature products, predictable load and its own infrastructure team. None of that describes an MVP.

Prime Video published that, by packaging into a single process a service previously distributed across functions and orchestration, its infrastructure cost dropped by more than 90%. The post was taken down, and the real scope was an internal video quality analysis tool for one team, which the post itself said had not been designed to run at large scale. It is not, and never was, "Amazon abandoned serverless".

Ahrefs compared its own servers in colocation with an equivalent cloud instance and arrived at a ratio of more than ten times. The author himself noted that the comparison is not exact and that it involves an extremely CPU and disk intensive workload, a web crawler at scale, which is the opposite of an event-driven application.

The pattern of all three is the same: high, stable and predictable load wins with your own infrastructure; low, intermittent and uncertain load wins with metered usage. An MVP is, by definition, the second case. Citing 37signals to justify Kubernetes for a product with no users is using the evidence backwards.

When not to start serverless

High cost, poor fitDedicated infrastructure from the start
High cost, good fitServerless with a paid plan, backup and separate staging
Low cost, poor fitSimple managed container, no Kubernetes
Low cost, good fitStart here: serverless, and validate

The cases that call for a different decision from day one are specific and recognizable:

  • Contractual data residency or uptime SLA requirements. No Supabase plan below Enterprise offers a contractual availability SLA, not even the US$ 599 per month plan, which only guarantees support response time. If your client's contract requires an SLA, that changes the conversation before anything else.
  • Heavy, continuous processing. Transcoding, training, GPU use and long jobs do not belong at the edge.
  • Stable 24-hour load. The pay-per-use model wins with intermittent traffic and loses with constant traffic, where a reserved instance is cheaper.
  • Dependency on a library incompatible with the runtime. If the core of the product depends on something that only runs in full Node or as a native process, a container is the place.

Objective migration triggers

"Migrate when we grow" is not a criterion. These are:

  • The database instance has gone past Large and the bottleneck is CPU, not a badly written query
  • There is a business process that does not fit within the platform's maximum execution time
  • Pay-per-use compute cost has exceeded the equivalent reserved cost for three months in a row
  • A contract now requires an availability SLA or data residency in a specific region
  • The team already operates more than five independent services and needs a single deploy standard

If none is checked, migrating now is solving a problem that does not exist yet, and that is exactly the work the MVP cannot pay for. When one is checked, the move does not have to be total: you can move only the component that hit the limit, keeping the rest where it is. Postgres is still Postgres anywhere, and that is what makes the decision reversible.

Checklist before choosing your MVP stack

  • Does the product have a process that needs to run for more than 400 seconds?
  • Is there a contractual requirement for an SLA or a specific data region?
  • Does the front end depend on a persistent connection to the server?
  • Does any essential library require full Node or a native process?
  • Will there be real customer data before the first sale? If so, a paid plan from day one.
  • Is the staging environment in the budget? It is billed separately.
  • Is database access already configured with the pooler in transaction mode?

If the first four answers are no, the stack in this article delivers more validation speed for less money than any server-based alternative.

Frequently asked questions

For most MVPs, no. The control plane alone of a managed Kubernetes cluster costs about US$ 0.10 per hour, roughly US$ 73 per month, before any node. An equivalent serverless stack comes to around US$ 37 to 65 per month, with production and staging, and goes live the same day.

Conclusion

The 2026 question is not whether serverless replaces servers. It is how long your product can go without needing them, and the honest answer is: much longer than most teams imagine. A B2B application with a few thousand users fits comfortably in the stack described here, for a few dozen dollars a month.

The expensive mistake is not choosing serverless. It is choosing infrastructure for the scale you expect to have in three years, paying today for complexity that delays the only thing that matters at this stage: finding out whether anyone wants the product.

Start simple, measure, and solve scale problems when they really show up, with the money that validation brought in.

References

All prices and limits were read on the official pages on August 6, 2026, in US dollars. Cloud prices change without notice and vary by region: confirm at the source before finalizing a budget.

Previous post
Software factory with AI agents: the pipeline from brief to deploy
Next post
Which AI to use at each stage of software development
Newsletter

One email a month, no noise

What we learn shipping custom software and applied AI.

Related articles

What is DevOps?4 min · Engineering
Understanding the Angular framework2 min · Engineering
APIs and microservices: the reinvention of technology2 min · Engineering
Blockchain APIs: what can we learn from the application?2 min · Engineering
Docker: smart storage2 min · Engineering

Accelerate your business with X-Apps

Ask for a Budget
X-Apps is an IT provider partner and advised by
Gartner
Receive our e-mails
News on software and applied AI.
Follow X-Apps