Softwr

Cloud · head to head

Google Cloud Run vs Preact

Google Cloud Run logo

Google Cloud Run

Cloud

Managed platform for running containers and functions on Google Cloud

From
On request
Free plan
No
Preact logo

Preact

Web Development

3kB alternative to React with the same modern API

From
Free
Free plan
Yes

The short version

  • Preact is free; Google Cloud Run prices on request.
  • Only Google Cloud Run lists deploy any container image; only Preact lists 3kB runtime.
  • Where Google Cloud Run falls short: runs only on Google Cloud, so there is no self-hosted option.
  • Where Preact falls short: compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose.

How do Google Cloud Run and Preact differ?

Google Cloud Run and Preact differ on starting price (On request against Free), pricing model and free tier (No against Yes). Only the attributes on which Google Cloud Run and Preact actually diverge.

Attributes where Google Cloud Run and Preact differ
AttributeGoogle Cloud RunPreact
Starting priceOn requestFree
Pricing modelUsage-basedOpen source, no licence fee
Free tierNoYes
CategoryCloudWeb Development

Identical on both: platforms (Web).

Which features does each one have?

They share no listed features; 9 appear only for Google Cloud Run and 4 only for Preact. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.

Only in Google Cloud Run

  • Deploy any container image
  • Source-based builds for common languages
  • Services with automatic scaling and scale to zero
  • Jobs for scheduled or manual tasks
  • Worker pools for background processing
  • Traffic splitting and rollback between revisions
  • Custom domains and managed TLS
  • Request-based and instance-based billing

Only in Preact

  • 3kB runtime
  • preact/compat
  • Same modern API
  • Fast rendering

What is each one used for?

Google Cloud Run is most often brought in for hosting web APIs and microservices; Preact for embedded widgets that load inside someone else’s page and must stay small. The jobs each tool is most often brought in to do.

Google Cloud Run

  • Hosting web APIs and microservicesnot Preact
  • Scheduled batch jobsnot Preact
  • Queue consumers on worker poolsnot Preact
  • Deploying containers without managing clustersnot Preact
  • Event-driven backends with Pub/Subnot Preact

Preact

  • Embedded widgets that load inside someone else’s page and must stay smallnot Google Cloud Run
  • Marketing and content sites where JavaScript payload affects Core Web Vitalsnot Google Cloud Run
  • Applications targeting low-bandwidth or low-powered devicesnot Google Cloud Run

Where do Google Cloud Run and Preact fall short?

Google Cloud Run's most cited limit: runs only on Google Cloud, so there is no self-hosted option. Preact's: behavioural differences from React exist in edge cases, particularly around event handling. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Google Cloud Run

  • Runs only on Google Cloud, so there is no self-hosted option
  • The container file system is in memory and not persistent
  • Worker pools do not autoscale natively and need at least one instance
  • Services are stateless, so state needs external storage

Preact

  • Compatibility through preact/compat is good but not total, and some React libraries break in ways that are hard to diagnose
  • Behavioural differences from React exist in edge cases, particularly around event handling
  • A much smaller community, so unusual problems have fewer existing answers than React

How much do Google Cloud Run and Preact cost?

Preact is free to use. Plan by plan below, from each vendor's own pricing page.

Google Cloud Run

On request

No published plan breakdown. See the Google Cloud Run review.

Preact

Free
  • PreactFree
    • Full library
    • Commercial use permitted
    • No usage limits

Which should you pick?

Choose Google Cloud Run if

  • You need deploy any container image.
  • You also want source-based builds for common languages.

Choose Preact if

  • You need 3kb runtime.
  • You want to start without paying.
  • You also want preact/compat.

Questions people ask

Is Google Cloud Run or Preact better?
It depends on the job. Google Cloud Run fits hosting web APIs and microservices; Preact fits embedded widgets that load inside someone else’s page and must stay small. Google Cloud Run starts at On request and Preact at Free.
Which is cheaper, Google Cloud Run or Preact?
Preact has a free tier; the other does not. Paid plans start at On request for Google Cloud Run and Free for Preact.
Does Google Cloud Run or Preact run on more platforms?
Both run on Web, so platform support will not decide this one for you.
Can I use Preact for free?
Yes. Preact has a free tier, so you can try it without paying. Google Cloud Run starts at On request.
What is Google Cloud Run best used for?
Google Cloud Run is most often used for hosting web apis and microservices, scheduled batch jobs, queue consumers on worker pools, deploying containers without managing clusters. Of those, hosting web apis and microservices and scheduled batch jobs are not what Preact is typically brought in for.
What can Google Cloud Run do that Preact cannot?
Google Cloud Run covers Deploy any container image, Source-based builds for common languages, Services with automatic scaling and scale to zero, Jobs for scheduled or manual tasks. Preact covers 3kB runtime, preact/compat, Same modern API, Fast rendering.

Answered from the vendors’ own pages

Google Cloud Run: What can Cloud Run run?

Any container image, or source code for Go, Node.js, Python, Java.NET and Ruby that Google builds into a container.

Source
Preact: Is Preact free?

Yes, open source under the MIT licence.

Google Cloud Run: How is Cloud Run billed?

Allocated CPU and memory are billed in 100 millisecond granularity, in request-based or instance-based mode. A free tier is available.

Source
Preact: Can I use React libraries with Preact?

Most, through the preact/compat layer. Compatibility is good but not complete, so libraries relying on React internals can break.

Google Cloud Run: Can Cloud Run scale to zero?

Yes. Services scale to zero when idle unless a minimum number of instances is set.

Source
Preact: Why choose Preact over React?

Bundle size, almost always. If payload is not a binding constraint, React’s ecosystem is usually the better trade.

Share

Related pages

Other head to heads