1 min readfrom InfoQ

Cloudflare Workers Accept Inbound TCP, with gRPC the First Protocol on Top

Our take

For eight years, Cloudflare Workers were limited to HTTP. That restriction ends now. Introducing inbound TCP connections via a new `connect(socket)` handler, routed through Spectrum, unlocks powerful new possibilities. Initially focused on gRPC—the first protocol supported—this expands Worker capabilities to include full-duplex communication in any language, effectively bringing container-like functionality to the edge. Workers now support unary and server-streaming through automatic gRPC-web translation. Currently in private beta, this development echoes Cloudflare’s broader innovation, as seen in projects like Kitesurf, a browser engine for automated workloads.
Cloudflare Workers Accept Inbound TCP, with gRPC the First Protocol on Top

The announcement from Cloudflare regarding inbound TCP connections for Workers marks a significant shift in the edge computing landscape, effectively dismantling a long-standing architectural limitation. For eight years, Workers were primarily confined to handling HTTP requests, restricting their application scope. Now, with the introduction of the `connect(socket)` handler and routing via Spectrum, that constraint is lifted, opening doors to a far broader range of use cases. This move allows developers to build applications that leverage the speed and proximity of the edge for protocols beyond web requests, a development that’s particularly relevant given Meta’s recent expansion of its custom silicon strategy [Meta Expands Its Custom Silicon Strategy From Compute Into Networking]. The ability to handle TCP directly, especially when combined with the gRPC support, suggests a deliberate move toward enabling more complex and performant edge-based services.

The immediate benefit is the seamless integration of gRPC, a high-performance, open-source remote procedure call (RPC) framework, into the Workers ecosystem. This allows containers to enjoy full-duplex gRPC communication in any language, while Workers gain unary and server-streaming capabilities through automatic gRPC-web translation. Previously, achieving similar functionality often involved complex workarounds or significantly increased latency. This ease of integration is crucial for developers building microservices architectures and real-time applications where low latency and efficient communication are paramount. Consider the implications for gaming, financial trading platforms, or any application requiring immediate data exchange – Cloudflare is positioning Workers as a viable alternative to traditional server-side deployments for these demanding workloads. It's a parallel to Cloudflare’s recent introduction of Kitesurf [Cloudflare Announces Kitesurf, a Browser Engine for Agents], both demonstrating a push towards specialized, efficient execution environments. The fact that Pie, a social app originally focused on events, is evolving into a broader social network [Andy Dunn’s startup Pie becomes less of an events app and more of a social network] highlights the increasing demand for adaptable platforms that can handle diverse communication needs, a demand Cloudflare is now directly addressing.

The architectural implications are profound. By embracing TCP and gRPC, Cloudflare is moving beyond a purely HTTP-centric edge and enabling a more generalized compute platform. This shift aligns with the broader trend of blurring the lines between edge computing, serverless functions, and containerized applications. Spectrum, Cloudflare’s global network backbone, plays a critical role in this evolution, providing the necessary infrastructure to route and manage these TCP connections at scale. The private beta status suggests that while the technology is mature enough to demonstrate its capabilities, further optimization and scalability testing are underway before a wider release. This controlled rollout allows Cloudflare to gather feedback and ensure a smooth transition for developers.

Ultimately, the introduction of inbound TCP and gRPC support for Cloudflare Workers represents a significant step towards unlocking the full potential of edge computing. It empowers developers to build more sophisticated and performant applications, leveraging the speed and proximity of the edge for a wider range of use cases. The question now is: how quickly will developers adopt this new functionality and what innovative applications will emerge as a result? The move signals a clear commitment from Cloudflare to evolve Workers beyond a simple HTTP proxy and into a truly versatile edge computing platform, and the broader industry will be watching closely to see how this unfolds.

Cloudflare Workers can now accept inbound TCP connections through a new connect(socket) handler routed via Spectrum, ending an eight-year restriction to HTTP. Containers get full-duplex gRPC in any language, while Workers get unary and server-streaming through automatic gRPC-web translation. Everything is private beta.

By Steef-Jan Wiggers

Read on the original site

Open the publisher's page for the full experience

View original article