Workers take inbound TCP from 19 Nov 2026: gRPC, MQTT and one Pro app

Pro and Business zones can point one Spectrum TCP port at a Worker, then pipe it to a Container running gRPC, MQTT or a custom TCP server.

Read time
17 min
Word count
2.6K
Sections
12
FAQs
8
Share
Infrastructure engineer reviewing a network plan beside server hardware, with Cloudflare Workers, gRPC and MQTT labels
On this page · 12 sections
  1. What Cloudflare shipped on 19 November 2026
  2. How the connection path works
  3. What Pro and Business zones actually get
  4. TLS: who holds the certificate
  5. What fits and what does not
  6. Limits worth testing before you move a service
  7. What it costs, with the arithmetic
  8. Should you move the service off its VM?
  9. A first deployment, step by step
  10. India-specific considerations
  11. How eCorpIT can help
  12. References

Summary. On 19 November 2026 Cloudflare put two linked features into public beta: Workers can accept inbound TCP connections, and Containers can serve bidirectional gRPC streams. Public traffic arrives through a Spectrum application whose origin is a Worker; the Worker's new connect() handler receives the raw socket and can handle the bytes itself or pipe them through a Durable Object to a Container. The plan detail matters most for smaller teams: Worker-origin Spectrum applications work on Pro and Business zones, not only with Spectrum Enterprise, but without Spectrum Enterprise each zone gets one such application on one TCP port, with no TLS termination at the edge. Free zones are excluded. Containers need the Workers Paid plan, which starts at $5 a month (about ₹461.20) and includes 25 GiB-hours of memory and 375 vCPU-minutes of container compute. Our verdict: for a single gRPC, MQTT-style or custom TCP service that only lives on a VM because Workers could not take raw TCP, this removes the blocker on a Pro zone. Treat it as beta, keep TLS inside your Container, and keep the VM until you have tested reconnects, half-closes and cost under real load.

About this article. This is for backend engineers, platform teams and CTOs who run gRPC, MQTT-style or custom TCP services on VMs and already use Cloudflare. On 26 November 2026 we checked every limit, field name, price and date here against Cloudflare's changelog entries of 19 November 2026, the Spectrum, Workers, Durable Objects and Containers developer documentation and pricing pages, and the European Central Bank's reference rates. The feature is in public beta and Cloudflare can change limits and prices; this is technical guidance, not financial advice, and no vendor paid for inclusion. Researched with AI assistance and checked against the primary sources listed in the references.

What Cloudflare shipped on 19 November 2026

The changelog entry is tagged for four products at once: Spectrum, Containers, Durable Objects and Workers. It makes three statements that together change what you can run on Cloudflare without a VM:

  • Inbound TCP to Workers is in public beta. A Worker that exports a connect() handler receives each inbound TCP connection as a socket with readable and writable streams.
  • Bidirectional gRPC in Containers is in public beta. A Container can run an existing gRPC server in any language, and clients can hold a two-way stream open through Spectrum and Workers.
  • Pro and Business zones qualify. Worker-origin Spectrum applications are available on Pro and Business zones, and on Enterprise zones with Spectrum Enterprise enabled. Without Spectrum Enterprise, a Pro or Business zone gets one Worker-origin application on one TCP port.

The same day Cloudflare also shipped a redesigned Spectrum dashboard, in which new TCP and UDP applications have IP Access Rules off by default to match the API. That entry is separate, but you will meet the new screens when you create your first Worker-origin application. Nothing newer on this feature had appeared in the changelog by 25 November.

Before this, Workers could open outbound TCP sockets with connect() from cloudflare:sockets, but a public client could not open a raw TCP connection to a Worker. An HTTP CONNECT request to a Worker's public URL still does not invoke the new handler; only Spectrum, or another Worker over a service binding, delivers inbound sockets.

How the connection path works

Cloudflare's documentation shows a four-hop chain for the gRPC case. In plain text:


            TCP or gRPC client
   |
Spectrum application (public hostname, one edge port)
   |
Worker connect() handler (handles bytes or forwards them)
   |
Durable Object connect() handler (picks one Container instance)
   |
Container TCP port (gRPC, MQTT broker or custom server)
          

Each hop is a byte pipe. The Worker does not parse gRPC; it pipes the client's encrypted byte stream to the Container in both directions, and the Container terminates TLS and handles HTTP/2 and gRPC itself.

Three details from the docs decide whether your service survives this path:

  1. Half-closes are preserved. Inbound sockets keep TCP half-close behaviour, so a client can finish sending while the server keeps streaming. Outbound hops must set allowHalfOpen: true to keep that behaviour end to end, which is what client-streaming gRPC calls need.
  1. The handler's promise is the connection's lifetime. When the promise returned by connect() settles, the inbound socket closes, so every pipe must be awaited.
  1. Client addresses are passed through. For Spectrum connections, remoteAddress holds the original client IP and source port, and localAddress holds the edge IP and Spectrum port, so you can rate-limit by client. Handle the case where remoteAddress is undefined, which the docs say happens when address metadata is unavailable.

The Durable Object hop exists so that one name maps to one Container instance. In Cloudflare's example every connection goes to the Durable Object named grpc-demo, which runs a lite Container and reaches it with ctx.container.getTcpPort(50051).connect(). For a stateless service you could route by client or shard; for a stateful broker, one name per broker instance keeps sessions together. Our Durable Objects production guide covers naming and placement in more depth.

What Pro and Business zones actually get

The protocols-per-plan table is the clearest statement of the limits. Spectrum itself is a paid add-on on Pro and Business and is not available on Free. The table below draws on Cloudflare's protocols-per-plan, settings-by-plan and Worker-origin guide pages.

Capability Pro or Business, no Spectrum Enterprise Spectrum Enterprise
Worker-origin TCP application One per zone, beta Paid add-on, beta
Ports per Worker-origin app One TCP port, no ranges One TCP port, no ranges
TLS termination at the edge Not available, pass-through only tls set to off or flexible
TCP to an IP or DNS origin Not available Paid add-on
UDP applications Not available Paid add-on
SSH and Minecraft apps One each, unchanged (RDP on Business) Available
API fields allowed dns, protocol, traffic_type, origin_worker_id The same plus tls

Some points are easy to miss:

  • The Worker-origin app is extra. It sits alongside the SSH, Minecraft or RDP application your plan already allows; it does not replace them.
  • Spectrum Enterprise is not the Enterprise plan. Cloudflare states that Spectrum Enterprise access is separate from a zone's Enterprise plan, and the docs list only Pro and Business zones, or zones with Spectrum Enterprise, as supported. If you run an Enterprise zone without Spectrum Enterprise, confirm with your account team before planning on this.
  • Send only four fields. On Pro and Business without Spectrum Enterprise, the create request must contain only dns, protocol, traffic_type and origin_worker_id. Enterprise-only fields must be omitted even when set to false or off. Even with Spectrum Enterprise, Worker origins reject origin address fields, Proxy Protocol and Argo Smart Routing.
  • The Worker must be in the same account as the zone, and the API wants the Worker's immutable 32-character tag, not its name.
  • IPv4 hostnames are capped per account. By default an account can have 10 Spectrum hostnames on Cloudflare-managed IPv4 addresses across all zones; IPv6-only applications do not count.

In practice, one app per zone means one public TCP service per domain. A team that needs a gRPC API and an MQTT endpoint can put them on two zones, or put both behind one port and route inside the Worker or Container, which only works when the protocols can be told apart from the first bytes.

TLS: who holds the certificate

Without Spectrum Enterprise, Spectrum passes the TCP payload to the Worker without terminating TLS, and the dashboard offers no TLS or advanced options for these applications. Your choices are:

  • Terminate TLS in the Container. This is what Cloudflare's gRPC example does: the Worker and Durable Object forward encrypted bytes, and the Container's gRPC server presents a certificate and key that the Durable Object reads from Secrets Store before starting it.
  • Run plaintext. The echo example is tested with nc, which is fine for a lab and wrong for production traffic over the internet.
  • Buy Spectrum Enterprise. It adds Flexible TLS termination, which needs an advanced or custom certificate covering the Spectrum hostname; Universal SSL is not supported with Spectrum.

STARTTLS protocols need care. A Worker cannot call socket.startTls() on an inbound Spectrum socket, even with TLS off, so SMTP on port 587 or IMAP on port 143 must be proxied to a backend that performs the upgrade itself.

What fits and what does not

Cloudflare's Worker-origin guide lists the intended uses: routing bidirectional protocols such as gRPC to a Container, exposing existing TCP applications in Containers without rewriting them as HTTP services, running MQTT, multiplayer game and custom binary protocol servers in Containers, receiving device, telemetry or syslog data over TCP for storage or queues, and running lightweight TCP services directly in Workers. The table below draws on that guide, the protocols-per-plan page, the connect handler reference and the TCP sockets considerations.

Workload Fits the Pro or Business beta? Why
gRPC API with streaming calls Yes One port, TLS in the Container, half-close kept
MQTT-style broker in a Container Yes, one port Long-lived TCP, broker terminates TLS
Device telemetry or syslog over TCP Yes Worker can parse and write to queues
Custom binary protocol server Yes Bytes pass through untouched
UDP game or VoIP traffic No Worker origins are TCP only; UDP needs Enterprise
Service needing a port range No Port ranges are not supported
SMTP or IMAP with STARTTLS in the Worker No startTls() is not supported on inbound sockets
Worker calling back to its own hostname No Outbound TCP to Cloudflare IPs is blocked

If your team is weighing gRPC against REST or GraphQL for a new service rather than moving an old one, our REST vs GraphQL vs gRPC decision for agent tools sets out the trade-offs.

Limits worth testing before you move a service

These limits come from the Workers and Containers docs; none of them is new on 19 November, but each matters more once a Worker holds a raw socket.

  • CPU time is separate from connection time. CPU time on the Workers Paid plan defaults to 30 seconds per invocation and can be raised to 5 minutes; waiting on network I/O does not count. A pipe that mostly waits for bytes uses little CPU, but a Worker that parses a protocol byte by byte can hit the ceiling on a long connection. Cloudflare's docs do not publish a separate limit for connect() invocations, so test it.
  • Runtime updates end long connections. When Cloudflare rolls out a new Workers runtime, old processes drain during a grace period and then close their remaining connections, so clients must reconnect and retry.
  • Six connections may wait at once. Each invocation can have up to six outbound connections waiting for their first response, and opening a TCP socket with connect() counts while it is being set up.
  • No loops back into Cloudflare. Outbound TCP sockets to Cloudflare IP ranges are blocked, so the Worker cannot connect to its own Spectrum hostname.
  • Container sizes. Instance types run from lite (1/16 vCPU, 256 MiB, 2 GB disk) to standard-4 (4 vCPU, 12 GiB, 20 GB disk), and these account defaults can be raised on request.
  • Local testing has its own port. wrangler dev serves HTTP on 8787 by default; a connect entry in the Wrangler configuration opens a separate raw TCP listener, 8788 in the docs, for local gRPC or nc tests.

What it costs, with the arithmetic

Cloudflare has not published a Spectrum price for Pro and Business on the pages we checked; the protocols table only says Spectrum is a paid add-on there, and the Worker-origin guide tells you to review your Spectrum subscription charges and notes that Workers usage is billed separately. Check the Spectrum page in your dashboard before you commit. The Workers, Durable Objects and Containers side is published.

Worked example: one lite Container running all month behind one Durable Object. We assume 30 days (720 hours), the Container never sleeps, and its CPU is fully busy, which is the worst case because CPU is billed on active use only.

  • Memory. 0.25 GiB x 720 hours = 180 GiB-hours. Minus 25 included = 155 GiB-hours = 558,000 GiB-seconds x $0.0000025 = $1.40.
  • CPU. 1/16 vCPU x 720 hours = 45 vCPU-hours = 2,700 vCPU-minutes. Minus 375 included = 2,325 minutes = 139,500 vCPU-seconds x $0.000020 = $2.79.
  • Disk. 2 GB x 720 hours = 1,440 GB-hours. Minus 200 included = 1,240 GB-hours = 4,464,000 GB-seconds x $0.00000007 = $0.31.
  • Durable Object duration. If it stays active all month, it is billed at 128 MB: 0.128 GB x 2,592,000 seconds = 331,776 GB-seconds, inside the 400,000 GB-seconds included each month.
  • Workers Paid base. $5 per month, with 10 million requests and 30 million CPU milliseconds included.
Line Monthly usage Cost in US dollars
Workers Paid base One account 5.00
Container memory 155 GiB-hours over allowance 1.40
Container CPU, worst case 2,325 vCPU-minutes over allowance 2.79
Container disk 1,240 GB-hours over allowance 0.31
Durable Object duration 331,776 GB-seconds 0.00
Total before Spectrum and egress 9.50

That is about ₹876.28 a month before Spectrum charges and before Container egress, which is $0.025 per GB after 1 TB in North America and Europe, and $0.04 per GB after 500 GB in most other regions, including India. Rupee figures use the ECB reference rates of 25 November 2026 (1 euro = 1.0935 US dollars = 100.8590 rupees), crossed to 92.24 rupees per US dollar and rounded to two decimals.

One open question: the Workers pricing page says a WebSocket connection is charged as one request for the initial upgrade, but it does not say how an inbound TCP connection to connect() is metered. Watch your request and CPU metrics in the first week rather than assuming one connection equals one request, and consider the spending limits Cloudflare added for Workers and Durable Objects, covered in our spending limits guide.

For a broader comparison, our Workers vs Vercel Functions cost model shows how the per-request and CPU lines add up at larger volumes.

Should you move the service off its VM?

The 19 November change removes one specific reason to keep a backend on a VM: you can now give a raw TCP or gRPC service a public endpoint on a Pro zone with the compute on Cloudflare. It does not remove the others.

Situation Move now? Reason
One internal gRPC service, low to moderate traffic Pilot it Fits one app per zone; TLS stays in your Container
MQTT broker for a few thousand devices Pilot with a second endpoint Beta status; keep the VM as fallback
Several TCP services on one domain Wait or buy Spectrum Enterprise One Worker-origin app per Pro or Business zone
UDP or port-range protocols No Not supported on Worker origins
Contractual uptime commitments to customers Not yet Public beta; limits and prices can change
Only want to hide an existing VM Different route Spectrum TCP to an IP or Tunnel origin is an Enterprise add-on

Spectrum can reach a private VM through Cloudflare Tunnel as a virtual network origin, but that is a TCP application with an IP origin, which the plan table offers only as a Spectrum Enterprise add-on. On a Pro or Business zone, the new Worker-origin path is the only general TCP option.

A first deployment, step by step

  1. Check the zone. It must be Pro or Business (or have Spectrum Enterprise), with Cloudflare authoritative for DNS, and in the same account as the Worker.
  1. Write the Worker. Export a connect(socket, env, ctx) handler. Start with an echo or a straight pipe to the Durable Object, with allowHalfOpen: true on every outbound socket.
  1. Add the Durable Object and Container. Follow Cloudflare's bidirectional gRPC example: a Dockerfile that exposes the gRPC port, a Durable Object class with its own connect() handler, and TLS credentials in Secrets Store.
  1. Test locally. Add a connect listener to the Wrangler configuration and point your client or nc at the local TCP port.
  1. Deploy and find the Worker tag. Spectrum needs the 32-character tag, which you get from the Workers scripts search in the Cloudflare CLI or the List Workers API.
  1. Create the Spectrum application. In the dashboard choose the Workers (tcp) application type, which is unavailable if the zone already has a Worker-origin app. By API, send only the four allowed fields:

            {
  "dns": { "type": "CNAME", "name": "tcp.example.com" },
  "protocol": "tcp/50051",
  "traffic_type": "worker",
  "origin_worker_id": "<WORKER_TAG>"
}
          
  1. Verify and watch. Confirm the handler ran in the Worker's real-time logs, then load-test long-lived streams, client disconnects and Container restarts before you move real traffic.

India-specific considerations

For Indian teams the main draw is cost and operations: a single lite Container in our worst-case model costs about ₹876.28 a month before Spectrum and egress; compare that with your current VM, public IP and patching effort, not with list prices alone. Two cautions apply. Container egress from India falls in the rest-of-world band, billed at $0.04 per GB after 500 GB included, against $0.025 per GB after 1 TB in North America and Europe. And if the TCP service carries personal data of people in India, moving it changes where it is processed, so update your Digital Personal Data Protection Act records of processors and locations before cut-over.

How eCorpIT can help

eCorpIT is a Gurugram-based technology organisation, founded in 2021, assessed at CMMI Level 5 and MSME certified, with senior-led engineering teams working across AWS, Microsoft and Google platforms. Our cloud migration team can assess which of your gRPC, MQTT or custom TCP services fit the one-app-per-zone beta and build the Worker, Durable Object and Container path with your VM kept as a tested fallback. Talk to us at /contact-us/.

Last updated: 26 November 2026.

References

  1. Inbound TCP and gRPC for Workers and Containers now in public beta, 19 November 2026 — Cloudflare Changelog
  1. Connect handler — Cloudflare Workers docs
  1. Route TCP traffic to a Worker — Cloudflare Spectrum docs
  1. Protocols per plan — Cloudflare Spectrum docs
  1. Containers pricing — Cloudflare Containers docs
  1. Workers pricing — Cloudflare Workers docs
  1. Bidirectional gRPC with Workers and Containers — Cloudflare Containers docs
  1. Redesigned Spectrum dashboard, 19 November 2026 — Cloudflare Changelog
  1. TCP sockets — Cloudflare Workers docs
  1. Settings by plan — Cloudflare Spectrum docs
  1. Limitations — Cloudflare Spectrum docs
  1. Workers limits — Cloudflare Workers docs
  1. Limits and instance types — Cloudflare Containers docs
  1. Durable Objects pricing — Cloudflare Durable Objects docs
  1. Euro foreign exchange reference rates, 25 November 2026 — European Central Bank

Frequently asked

Quick answers.

01 What did Cloudflare announce on 19 November 2026?
Cloudflare put two features into public beta on that date. Workers can accept inbound TCP connections through a connect handler, fed by a Spectrum application whose origin is the Worker, and Containers can serve bidirectional gRPC streams through that same path. Pro and Business zones can use it, with a limit of one application per zone.
02 How many Worker-origin Spectrum applications can a Pro zone have?
Without Spectrum Enterprise, a Pro or Business zone can have one Worker-origin application, listening on one TCP port. Port ranges are not supported. This application is in addition to the SSH, Minecraft or RDP applications the plan already allows, so it does not use up those existing slots on the zone.
03 Can a Free zone use inbound TCP to Workers?
No. Cloudflare's guide says Free zones are not supported for Worker-origin Spectrum applications. You need a Pro or Business zone, or a zone with Spectrum Enterprise enabled. A Worker can still accept TCP from another Worker over a service binding, but public internet clients need the Spectrum route.
04 Does Cloudflare terminate TLS for these TCP applications?
Not on Pro or Business without Spectrum Enterprise. Spectrum passes the encrypted bytes through to the Worker, so the Container or another backend must terminate TLS, as Cloudflare's gRPC example does. Spectrum Enterprise adds a Flexible TLS mode, which needs an advanced or custom certificate because Universal SSL does not work with Spectrum.
05 Can I run an MQTT broker this way?
Yes, Cloudflare lists MQTT servers in Containers as an intended use. Clients connect to the Spectrum hostname and port, the Worker pipes bytes through a Durable Object, and the broker in the Container handles sessions and TLS. On a Pro or Business zone that broker would take the zone's single Worker-origin port.
06 Does the Worker need to understand gRPC?
No. In Cloudflare's example the Worker and the Durable Object only pipe bytes in both directions. The gRPC server inside the Container terminates TLS and handles HTTP/2 framing and the streaming calls. The one setting that matters on each hop is allowing half-open sockets, so client-streaming calls can finish cleanly.
07 What does it cost to run one small Container behind it?
Our worst-case model for one lite Container running all month comes to about 9.50 US dollars, including the 5 dollar Workers Paid base, which is roughly 876.28 rupees at ECB rates of 25 November 2026. Spectrum charges for Pro and Business are not published on the pages we checked, and Container egress is billed separately.
08 Is it safe to move production traffic now?
It is a public beta, so limits and prices can change and there is no general availability date yet. A sensible plan is to run one service on a second hostname, test long streams, disconnects and Container restarts under real load, and keep the existing VM as a fallback until the results and the bill hold.

About the author

Manu Shukla

Founder & Director

Founder of eCorpIT. Hands-on engineer leading senior-only delivery for AI apps, custom software, and cloud systems for global clients.

Subscribe

One engineering note a week. No fluff, no spam.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data, and marketing — delivered every Wednesday.

Past the reading

Read enough. Let's build something.

A senior architect responds in 24 working hours with scope, indicative cost, and a timeline. NDA before any technical conversation.

Weekly engineering notes

Enjoying this article? Get one like it every Wednesday.

Senior-architect playbooks on AI agents, mobile apps, cloud, security, data and marketing. Unsubscribe in one click.

We email a link to confirm your address. Privacy

Loading search…

Browse all guides