Softwr

Cloud · head to head

Google Cloud Run vs NATS

Google Cloud Run logo

Google Cloud Run

Cloud

Managed platform for running containers and functions on Google Cloud

From
On request
Free plan
No
NATS logo

NATS

Databases

High-performance messaging system for cloud-native applications

From
Free
Free plan
Yes

The short version

  • NATS is free; Google Cloud Run prices on request.
  • Only Google Cloud Run lists deploy any container image; only NATS lists very low latency.
  • Where Google Cloud Run falls short: runs only on Google Cloud, so there is no self-hosted option.
  • Where NATS falls short: core NATS has no persistence at all, so messages are lost if no subscriber is listening.

How do Google Cloud Run and NATS differ?

Google Cloud Run and NATS 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 NATS actually diverge.

Attributes where Google Cloud Run and NATS differ
AttributeGoogle Cloud RunNATS
Starting priceOn requestFree
Pricing modelUsage-basedOpen source, no licence fee
Free tierNoYes
PlatformsWebLinux, macOS, Windows, Self-hosted
CategoryCloudDatabases

Not yet recorded: founded for Google Cloud Run.

Which features does each one have?

They share no listed features; 9 appear only for Google Cloud Run and 4 only for NATS. 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 NATS

  • Very low latency
  • JetStream
  • Single binary
  • Request-reply

What is each one used for?

Google Cloud Run is most often brought in for hosting web APIs and microservices; NATS for service-to-service messaging where latency is the binding constraint. The jobs each tool is most often brought in to do.

Google Cloud Run

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

NATS

  • Service-to-service messaging where latency is the binding constraintnot Google Cloud Run
  • Edge and IoT messaging where a lightweight broker mattersnot Google Cloud Run
  • Replacing a heavier broker when the workload does not need its guaranteesnot Google Cloud Run

Where do Google Cloud Run and NATS fall short?

Google Cloud Run's most cited limit: runs only on Google Cloud, so there is no self-hosted option. NATS's: core NATS has no persistence at all, so messages are lost if no subscriber is listening. 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

NATS

  • Core NATS has no persistence at all, so messages are lost if no subscriber is listening
  • JetStream adds the durability but also the operational complexity NATS is chosen to avoid
  • A much smaller ecosystem than Kafka or RabbitMQ, with fewer connectors and integrations
  • Fewer people know it, so hiring and existing organisational knowledge favour the alternatives

How much do Google Cloud Run and NATS cost?

NATS 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.

NATS

Free
  • NATSFree
    • Full functionality
    • No usage limits
    • Community support

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 NATS if

  • You need very low latency.
  • You want to start without paying.
  • You work on Linux, macOS, Windows, Self-hosted.
  • You also want jetstream.

Questions people ask

Is Google Cloud Run or NATS better?
It depends on the job. Google Cloud Run fits hosting web APIs and microservices; NATS fits service-to-service messaging where latency is the binding constraint. Google Cloud Run starts at On request and NATS at Free.
Which is cheaper, Google Cloud Run or NATS?
NATS has a free tier; the other does not. Paid plans start at On request for Google Cloud Run and Free for NATS.
Does Google Cloud Run or NATS run on more platforms?
Google Cloud Run runs on Web. NATS runs on Linux, macOS, Windows, Self-hosted.
Can I use NATS for free?
Yes. NATS 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 NATS is typically brought in for.
What can Google Cloud Run do that NATS 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. NATS covers Very low latency, JetStream, Single binary, Request-reply.

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
NATS: Is NATS free?

Yes, open source and CNCF-graduated. Synadia sells a managed service.

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
NATS: Does NATS persist messages?

Core NATS does not — it is fire-and-forget. JetStream adds persistence, streaming and replay when you need them.

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
NATS: NATS or Kafka?

NATS is far lighter and lower latency, and much simpler to run. Kafka is the answer when you need a durable replayable log and a large connector ecosystem.

Share

Related pages

Other head to heads