APIs · head to head
Cloudflare Workers vs PubNub

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
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.
| Attribute | Cloudflare Workers | PubNub |
|---|---|---|
| Pricing model | Free plan plus usage-based paid plan | Freemium |
| Platforms | Web, Linux, macOS, Windows | Web, 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.
SourceCloudflare 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.
SourceCloudflare 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.
SourceRelated pages
More on Cloudflare Workers
Other head to heads
- Cloudflare Workers vs PartyKit
- Cloudflare Workers vs WebStorm
- Cloudflare Workers vs Particle
- Cloudflare Workers vs AWS Serverless Application Model (AWS SAM)
- Cloudflare Workers vs Postman
- Cloudflare Workers vs Swagger UI
- Cloudflare Workers vs Proxyman
- Cloudflare Workers vs Deno
- Cloudflare Workers vs Atlantis
- Cloudflare Workers vs LocalStack
- Cloudflare Workers vs Turborepo
- Cloudflare Workers vs Terraform
- Cloudflare Workers vs Claude Code
- Cloudflare Workers vs Keycloak
- Cloudflare Workers vs Cody
- Cloudflare Workers vs GitLab
- Cloudflare Workers vs GitHub
- Cloudflare Workers vs AWS CodeBuild
- Cloudflare Workers vs Pusher
- Cloudflare Workers vs Ably
- Cloudflare Workers vs Liveblocks
- Cloudflare Workers vs Novu
- Cloudflare Workers vs Courier
- Cloudflare Workers vs api.video
- Cloudflare Workers vs Svix
- Cloudflare Workers vs Yapily
- Cloudflare Workers vs Lithic
- Cloudflare Workers vs Mux
- Cloudflare Workers vs MX Technologies
- Cloudflare Workers vs Increase
- Cloudflare Workers vs Appwrite
- Cloudflare Workers vs Bruno
- Cloudflare Workers vs Marqeta
- Cloudflare Workers vs Temenos Transact
- Cloudflare Workers vs Apidog
- Cloudflare Workers vs Microsoft Azure API Management
- PubNub vs PartyKit
- PubNub vs WebStorm
- PubNub vs Particle
- PubNub vs AWS Serverless Application Model (AWS SAM)
- PubNub vs Postman
- PubNub vs Swagger UI
- PubNub vs Proxyman
- PubNub vs Deno
- PubNub vs Atlantis
- PubNub vs LocalStack
- PubNub vs Turborepo
- PubNub vs Terraform
- PubNub vs Claude Code
- PubNub vs Keycloak
- PubNub vs Cody
- PubNub vs GitLab
- PubNub vs GitHub
- PubNub vs AWS CodeBuild
- PubNub vs Pusher
- PubNub vs Ably
- PubNub vs Liveblocks
- PubNub vs Novu
- PubNub vs Courier
- PubNub vs api.video
- PubNub vs Svix
- PubNub vs Yapily
- PubNub vs Lithic
- PubNub vs Mux
- PubNub vs MX Technologies
- PubNub vs Increase
- PubNub vs Appwrite
- PubNub vs Bruno
- PubNub vs Marqeta
- PubNub vs Temenos Transact
- PubNub vs Apidog
- PubNub vs Microsoft Azure API Management
