Softwr

APIs · head to head

Cloudflare Workers vs PubNub

Cloudflare Workers logo

Cloudflare Workers

APIs

Serverless compute on Cloudflare's network, free to start and $5 a month minimum on the paid plan

From
Free
Free plan
Yes
PubNub logo

PubNub

APIs

Realtime communication platform for chat, IoT, and live data apps

From
Free
Free plan
Yes

The short version

  • Free plans on both; paid from $5/mo and $98/mo.
  • Only Cloudflare Workers lists edge execution; only PubNub lists pub/sub messaging.
  • Where Cloudflare Workers falls short: free has a 10 ms CPU cap.
  • Where PubNub falls short: free plan storage history is limited to 7 days, which is short for apps needing longer message retention.

How do Cloudflare Workers and PubNub differ?

Cloudflare Workers and PubNub differ on pricing model and platforms. Only the attributes on which Cloudflare Workers and PubNub actually diverge.

Attributes where Cloudflare Workers and PubNub differ
AttributeCloudflare WorkersPubNub
Pricing modelFree plan plus usage-based paid planFreemium
PlatformsWeb, Linux, macOS, WindowsWeb, iOS, Android, API

Identical on both: starting price (Free), free tier (Yes).

Not yet recorded: category for Cloudflare Workers, founded for Cloudflare Workers.

Which features does each one have?

They share no listed features; 6 appear only for Cloudflare Workers and 6 only for PubNub. 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 Cloudflare Workers

  • Edge execution
  • Workers KV
  • Durable Objects
  • Hyperdrive
  • Queues
  • Spend limits

Only in PubNub

  • Pub/sub messaging
  • Presence tracking
  • Message persistence
  • Serverless Functions
  • File sharing
  • Encryption and access controls

What is each one used for?

Cloudflare Workers is most often brought in for A low-latency API or middleware; PubNub for building realtime chat applications. The jobs each tool is most often brought in to do.

Cloudflare Workers

  • A low-latency API or middlewarenot PubNub
  • A full-stack app with static assetsnot PubNub
  • A cron-driven data jobnot PubNub
  • Rewriting or protecting traffic at the edgenot PubNub

PubNub

  • Building realtime chat applicationsnot Cloudflare Workers
  • Streaming live IoT sensor datanot Cloudflare Workers
  • Adding presence indicators to collaborative appsnot Cloudflare Workers
  • Running edge logic with serverless Functions on realtime eventsnot Cloudflare Workers

Where do Cloudflare Workers and PubNub fall short?

Cloudflare Workers's most cited limit: free has a 10 ms CPU cap. PubNub's: free plan storage history is limited to 7 days, which is short for apps needing longer message retention. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.

Cloudflare Workers

  • Free has a 10 ms CPU cap
  • The runtime is not full Node.js, so some libraries do not run
  • Costs scale with CPU time, so heavy compute surprises
  • Durable Objects and other products are billed separately
  • Logs and Logpush follow separate observability pricing from December 2026

PubNub

  • Free plan storage history is limited to 7 days, which is short for apps needing longer message retention
  • MAU-based pricing means costs scale directly with user growth, which can be less predictable than flat message-based pricing
  • Pro-tier custom pricing above 50,000 MAU requires contacting sales rather than self-serve checkout

How much do Cloudflare Workers and PubNub cost?

Cloudflare Workers has a free plan, with paid plans from $5/mo; PubNub has a free plan, with paid plans from $98/mo. Plan by plan below, from each vendor's own pricing page.

Cloudflare Workers

Free
  • Workers FreeFree
    • 100,000 requests per day
    • 10 ms CPU per invocation
  • Workers Paid$5/mo
    • 10 million requests included, then $0.30 per million
    • 30 million CPU ms included, then $0.02 per million

PubNub

Free
  • FreeFree
    • Up to 200 MAU or 1M transactions
    • 1GB data storage (7 days)
    • 5 test Serverless Functions
  • Starter$98/mo
    • 1,000 MAU included
    • User management
    • Insights
  • ProOn request
    • Custom MAU packages
    • Volume discounts
    • Enterprise-scale configurations

Which should you pick?

Choose Cloudflare Workers if

  • You need edge execution.
  • You want to start without paying.
  • You work on Web, Linux, macOS, Windows.
  • You also want workers kv.

Choose PubNub if

  • You need pub/sub messaging.
  • You want to start without paying.
  • You work on Web, iOS, Android, API.
  • You also want presence tracking.

Questions people ask

Is Cloudflare Workers or PubNub better?
It depends on the job. Cloudflare Workers fits a low-latency API or middleware; PubNub fits building realtime chat applications. Cloudflare Workers starts at Free and PubNub at Free.
Which is cheaper, Cloudflare Workers or PubNub?
Cloudflare Workers starts at Free and PubNub at Free.
Does Cloudflare Workers or PubNub run on more platforms?
Cloudflare Workers runs on Web, Linux, macOS, Windows. PubNub runs on Web, iOS, Android, API.
Can I use Cloudflare Workers for free?
Both have a free tier, so you can try either at no cost before committing.
What is Cloudflare Workers best used for?
Cloudflare Workers is most often used for a low-latency api or middleware, a full-stack app with static assets, a cron-driven data job, rewriting or protecting traffic at the edge. Of those, a low-latency api or middleware and a full-stack app with static assets are not what PubNub is typically brought in for.
What can Cloudflare Workers do that PubNub cannot?
Cloudflare Workers covers Edge execution, Workers KV, Durable Objects, Hyperdrive. PubNub covers Pub/sub messaging, Presence tracking, Message persistence, Serverless Functions.

Answered from the vendors’ own pages

Cloudflare Workers: Is Cloudflare Workers free?

Yes, with 100,000 requests a day.

PubNub: What does PubNub cost?

PubNub offers a free plan for up to 200 MAU or 1 million transactions, a Starter plan at $98/month for 1,000 MAU, and custom Pro pricing for larger volumes, e.g. around $550/month for 10,000 MAU.

Source
Cloudflare Workers: What does Paid cost?

A $5 monthly minimum plus usage.

PubNub: Is there a free plan, and what are its limits?

Yes, the free plan supports up to 200 monthly active users or 1 million transactions, includes 1GB of data storage retained for 7 days, and requires no credit card.

Source
Cloudflare Workers: Are static assets charged?

No, they are free and unlimited.

PubNub: How is usage metered?

PubNub bills primarily by Monthly Active Users, defined as a unique user who connects at least once in a billing cycle; messages are bundled into MAU pricing with no separate per-message fees, and overage is billed proportionally.

Source
Share

Related pages

Other head to heads