Cloudflare opens inbound TCP and bidirectional gRPC to Workers
Noura Mint ElySenior Technology Reporter Verified authorNoura Mint Ely is a Senior Technology Reporter at Desking, covering the latest developments in technology, artificial intelligence, enterprise software, cybersecurity, a…Author Profile Ad disclaimer For links on this page, DESKING APP may earn a commission from the provider. This supports our work and has no influence on our editorial rating.
Table of contents
Cloudflare made inbound TCP connections to Workers and bidirectional gRPC in Containers publicly available in beta on November 19, 2026.
The change gives developers a way to expose TCP services through Cloudflare Spectrum, route connections into a Worker, and forward the stream to a Container running an existing server.
It matters most to teams building real time systems, device services and voice applications that rely on persistent connections rather than conventional HTTP requests.
The release addresses a specific limitation in the Workers model.
Workers could already initiate outbound TCP connections, but accepting public TCP traffic required a different ingress path.
With the new arrangement, Spectrum receives the connection and invokes a Worker’s connect() handler.
That Worker can process the socket itself or pass it through a Durable Object to a Container.
The result is a new deployment option, although its beta status, plan restrictions and TLS responsibilities deserve attention before production adoption.
1. What changed at ingress

The central addition is an inbound TCP handler in the Workers runtime.
A deployed Worker can now export a connect() function that receives a socket with readable and writable streams.
Spectrum acts as the public entry point, accepting a TCP connection and delivering it to the selected Worker.
This gives developers access to raw connection data, which is different from the HTTP request and response model handled by the familiar fetch() function.
The distinction matters because many network services do not communicate through ordinary web requests.
MQTT brokers, telemetry collectors, multiplayer services and custom binary protocols can depend on persistent TCP sessions.
Cloudflare identifies these as possible uses for Worker origins.
Developers can inspect incoming data, apply routing logic or forward the connection to an existing service.
The feature therefore expands the range of workloads that can sit behind Cloudflare’s network without requiring every backend to become an HTTP application.
Cloudflare’s November 19 announcement also introduced bidirectional gRPC support through Containers.
The company’s earlier product announcement had described the functionality as a private beta.
The November update moved inbound TCP and the Container based gRPC path into public beta.
That distinction is important: developers can now evaluate the service, but public beta availability should not be treated as a guarantee of production maturity or unchanged limits.
2. How the connection travels

The published architecture uses four components: the client, Spectrum, a Worker, and a Durable Object connected to a Container.
Spectrum receives the public TCP session and invokes the Worker’s connect() handler.
The Worker opens another socket to a Durable Object, which then connects to the TCP port exposed by the Container.
Data travels in both directions across these connections, allowing the client and server to maintain a bidirectional stream.
The Worker is not acting as a gRPC server in this example.
Cloudflare’s documentation explains that it receives a raw TCP byte stream and does not parse gRPC or HTTP/2 frames.
The Container runs the actual gRPC server and handles the protocol processing.
This division is a useful architectural boundary: JavaScript code at the Worker layer can control routing, while an existing application written in another language can remain inside the Container.
The gRPC project describes bidirectional streaming as a call in which the client and server can independently send messages over their respective streams.
That behaviour suits applications where both sides need to communicate throughout one connection, including interactive voice systems and real time data exchange.
Cloudflare’s implementation preserves the underlying connection in both directions rather than translating the stream into a sequence of conventional HTTP requests.
The architecture can be understood through the responsibilities of each component:
- Spectrum: Accepts the public TCP connection and sends it to the configured Worker origin.
- Worker: Receives the socket through
connect()and decides where the stream should go. - Durable Object: Provides the intermediary connection to the Container in Cloudflare’s documented gRPC example.
- Container: Runs the application server, including the gRPC implementation and protocol handling.
This separation allows developers to keep an existing TCP or gRPC server while changing how clients reach it.
A team does not necessarily need to rewrite a service as an HTTP endpoint to expose it through this route.
However, the additional components also create more places to configure, observe and troubleshoot.
The design is an architectural option, not an automatic migration of an existing server.
3. Access depends on zone limits

Public beta access is not available on every Cloudflare plan.
Worker origin applications are supported on Pro and Business zones, as well as Enterprise zones with Spectrum Enterprise enabled.
Free zones are not supported.
Without Spectrum Enterprise, a Pro or Business zone is limited to one Worker origin application per zone, using one TCP port.
Spectrum Enterprise access is separate from simply having an Enterprise zone subscription.
The current restrictions have direct consequences for deployment planning.
A business with several TCP services cannot assume that one Pro or Business zone can expose all of them through separate Worker origin applications.
The single port restriction also means that a service requiring several public TCP ports needs a different design or an eligible Enterprise arrangement.
These are product availability constraints, not just configuration details.
| Access arrangement | Worker origin availability | Application limit | TCP port support |
|---|---|---|---|
| Free zone | Not supported | None | Not available |
| Pro zone | Public beta | One per zone | One port |
| Business zone | Public beta | One per zone | One port |
| Enterprise with Spectrum Enterprise | Supported | Subject to Enterprise access | Single port per application |
The table describes access to Worker origin applications, not the complete cost of running the application.
Cloudflare states that Workers usage is billed separately from Spectrum.
Container consumption and other platform resources also need to be considered.
A subscription that makes the ingress feature available should therefore not be mistaken for an all inclusive price for the complete service.
Azeem Hassni, a software engineer and solutions architect, independently summarized the November announcement and highlighted the same connection path from Spectrum through a Worker and Durable Object to a Container.
His account is useful as an outside technical explanation, but it is not a published performance test or an independent production deployment report.
At the time of writing, there is not enough public hands on evidence to establish real world latency, throughput or reliability under different workloads.
4. TLS remains an engineering decision

Encryption needs deliberate planning because the network path does not automatically mean that Spectrum terminates TLS for every eligible plan.
Cloudflare’s documented architecture forwards encrypted bytes through the Worker and Durable Object, with the Container terminating TLS and handling HTTP/2 and gRPC.
This means the backend service remains responsible for its certificate and TLS configuration in the documented Pro and Business arrangement.
The distinction is important for teams that currently rely on Cloudflare to terminate TLS at the edge.
The public beta should not be assumed to provide that same behaviour for every Worker origin.
Spectrum Enterprise supports edge TLS termination, while the Pro and Business Worker origin path passes TCP traffic through without terminating TLS.
A service that needs encrypted client connections must account for where the TLS handshake takes place and who manages the certificate.
The TCP protocol also has connection behaviour that a simple byte forwarding example can obscure.
Cloudflare’s sample uses allowHalfOpen: true so that TCP half closes are preserved as the stream moves between components.
This matters when one side finishes sending data while still expecting to receive a response.
The TCP specification defines connection shutdown and state handling, so a proxy that mishandles these transitions can create failures that are difficult to distinguish from application bugs.
Before exposing a service, developers should check the following operational details:
- Certificate ownership: Decide which component stores and renews the certificate used by the public service.
- Backend termination: Confirm that the Container can terminate TLS and serve the required HTTP/2 and gRPC traffic.
- Connection closure: Test client initiated and server initiated shutdown, including half close behaviour.
- Port allocation: Confirm that the application can operate through the single public TCP port available under the applicable plan.
There is another important limitation for legacy protocols.
Cloudflare’s routing documentation states that inbound Spectrum sockets cannot be upgraded with socket.startTls().
A protocol that begins in plaintext and later negotiates TLS through STARTTLS therefore needs a backend that handles that upgrade.
Teams should check this before moving mail, messaging or other legacy services to the new path.
The presence of TCP support does not mean every TCP based protocol will work without additional changes.
5. Where the new model fits
The strongest use case is a service that already speaks TCP or gRPC and needs a Cloudflare managed public ingress route.
Voice applications are an obvious example because they can maintain a stream while the client and server exchange messages.
Device telemetry, MQTT and custom binary protocols are other plausible workloads identified in Cloudflare’s documentation.
These applications can benefit from a Worker based routing layer while retaining their existing server implementation in a Container.
The feature is less compelling when a service already works well over HTTP or WebSockets.
Workers have established request handling through fetch(), and WebSockets already provide persistent two way communication for many application designs.
Moving to raw TCP introduces port, TLS and connection management responsibilities.
Developers should choose it because the protocol or existing service requires TCP, not simply because inbound sockets have become available.
The practical decision can be divided into a few common situations:
- Existing gRPC backend: Consider the Container route when the service requires native bidirectional gRPC and the existing server should remain intact.
- Custom TCP service: Consider a Worker origin when clients need a public TCP endpoint and the application can operate within the available port restrictions.
- HTTP based application: Keep the established HTTP request path unless the protocol requirements justify a persistent TCP connection.
- Legacy STARTTLS service: Retain or introduce a backend that performs the TLS upgrade, because the inbound socket cannot perform that upgrade through
socket.startTls().
There are still unanswered production questions.
The public announcement and documentation establish the architecture and current access restrictions, but they do not provide independent benchmark results for latency, concurrent connections or sustained throughput.
Nor does a public beta establish how the service will behave under every failure condition or workload profile.
Teams considering a migration should test connection recovery, certificate renewal, observability, capacity and billing with their own traffic patterns before committing a critical service.
For now, the release is a meaningful extension of the Workers platform for developers whose applications need inbound TCP.
Its value is clearest when a team wants Cloudflare at the network edge but does not want to replace an existing TCP or gRPC server.
The one application and one port limits on Pro and Business, the separate billing layers and the TLS responsibilities make eligibility and architecture checks essential.
It is a useful beta to evaluate, not yet a reason to move every persistent service.
Frequently Asked Questions
Can a Worker run a gRPC server directly?
Does an HTTP CONNECT request trigger connect()?
Can one zone expose several TCP ports?
Is inbound TCP available on Cloudflare Free?
Can Cloudflare terminate TLS for every Worker origin?
Is the feature ready for production workloads?
Sources5
- Azeem Hassni on Cloudflare inbound TCP
- Next F9 on Cloudflare TCP availability
- Cloudflare on inbound TCP and gRPC beta
- IETF on TCP connection standards
- gRPC on bidirectional streaming concepts
External pages are independent third-party sources. Desking App does not control or endorse their content and accepts no responsibility for it. Visiting them is at your own responsibility and risk.

