Cloudflare Workers and Containers Add Support for Inbound TCP and gRPC Connections

Cloudflare has expanded the capabilities of its edge development platform by introducing support for inbound TCP connections and gRPC traffic. This update allows Cloudflare Workers and Containers to receive direct socket connections via Cloudflare Spectrum, routing them seamlessly to Durable Objects and back-end services. Developers can now implement real-time, bidirectional communication protocols without needing complex intermediary proxy setups.
Related tools
Recommended tools for this topic
These picks prioritize high-intent tools relevant to this topic. Some links may include partner or affiliate tracking.
A strong security and edge platform match across CDN, Zero Trust, and app protection.
View CloudflareA high-relevance security pick for identity, secret management, and team access control.
View 1PasswordStrong for identity, OIDC, and B2B auth readers evaluating implementation tradeoffs.
View Auth0Comparison
| Aspect | Before / Alternative | After / This |
|---|---|---|
| Protocol support | Inbound connections were restricted to HTTP and HTTPS protocols | Supports direct inbound TCP socket connections and native gRPC |
| Traffic routing | Required manual conversion or proxying of non-HTTP traffic at the edge | Direct socket forwarding to Durable Objects and Containers via Cloudflare Spectrum |
| Client compatibility | Clients were forced to use HTTP-based APIs or gRPC-Web workarounds | Full-duplex gRPC connections and automatic gRPC-to-gRPC-web translation |
Action Checklist
- Enable Cloudflare Spectrum for your target hostnames to accept inbound TCP traffic Verify that your plan has Spectrum enabled before configuring routes
- Configure routing rules to forward inbound TCP sockets directly to Durable Objects or Containers Update wrangler.toml or your deployment configuration to handle incoming raw socket streams
- Implement gRPC handlers inside your Cloudflare Workers to process bidirectional RPC calls Test client connections to verify that automatic translation behaves as expected with your schemas
Source: Cloudflare Blog
This page summarizes the original source. Check the source for full details.


