← All stories
● Covered by 1 source · 1 reportMedium impact1 neutral

Cloudflare Workers Now Support Inbound TCP Connections and gRPC Protocol

🔄 Updated 1h ago
New to BrevFeed? We gather this story from every outlet covering it into one summary — ranked by real-world impact, not just the latest headline — so you never miss what matters. What is BrevFeed? →

Key points

  • Cloudflare Workers can now accept inbound TCP connections.
  • A new `connect(socket)` handler enables this functionality.
  • gRPC is the first protocol supported on top of inbound TCP.
  • Workers can serve unary and server-streaming gRPC via gRPC-web translation.

Expanded Connectivity for Cloudflare Workers

Cloudflare Workers, which previously only functioned as HTTP servers, now support inbound TCP connections. This new capability is facilitated by a `connect(socket)` handler, allowing Workers to receive and process non-HTTP traffic. This marks a significant expansion of the platform's networking features, moving beyond its initial HTTP-centric design.

Initial gRPC Support

The first protocol to leverage this new inbound TCP functionality is gRPC. While Workers can now handle unary and server-streaming gRPC, full bidirectional streaming is not natively supported within the Worker itself. Instead, Cloudflare translates incoming gRPC to gRPC-web and outgoing gRPC-web back to gRPC, a mechanism necessitated by current web platform API limitations regarding HTTP/2 stream-level control.

Underlying Mechanism and Broader Implications

The `connect(socket)` handler routes raw inbound sockets to a Worker via Cloudflare Spectrum, the company's existing ingress proxy for non-HTTP traffic. A Worker can directly read from and write to this socket, pass it to another Worker, or hand it off to a Durable Object. From a Durable Object, the socket can be further passed to a Container via `getTcpPort()`, enabling full-duplex communication for any TCP-based protocol, program, or language.

Platform Constraints and Future Outlook

The current limitation for full bidirectional gRPC streaming in Workers stems from web platform APIs like `fetch()` not exposing HTTP/2 stream-level control, which gRPC relies on for features like streaming, cancellation, and flow control. This is a similar challenge faced by browsers, leading to the existence of gRPC-web. Cloudflare has been converting gRPC to HTTP/1.1 since 2020 for security services. The new capabilities open the door for more diverse applications on the Workers platform, particularly those requiring persistent, bidirectional connections.

✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →

The daily brief

One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.

One email a day. Unsubscribe in one click, any time.

Today's brief

Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.

~8 min · 7 stories · Aug 29

▶ Play today's brief Listen on Spotify

New every morning, and the back catalogue is archived by date.

Reporting from

Cloudflare Workers can now accept inbound TCP connections, expanding their capabilities beyond HTTP-only server functions. This update introduces a new `connect(socket)` handler and initially supports gRPC, enabling full-duplex communication for various TCP-based protocols.