Workers Add TCP and gRPC Connectivity

Deploy real-time AI and gRPC services on Workers with direct TCP connectivity.
30-Second TL;DR
What Changed
Adds inbound TCP connections to Cloudflare Workers and Containers
Why It Matters
The update expands the types of networked and real-time services that can run on Cloudflare's edge platform. AI teams can more readily deploy streaming inference services, tool backends, or agent services that depend on gRPC connectivity.
What To Do Next
Test a streaming AI service on Workers using inbound TCP and full-duplex gRPC before redesigning its existing networking layer.
Key Points
- •Adds inbound TCP connections to Cloudflare Workers and Containers
- •Uses Spectrum for direct socket forwarding to Durable Objects and Containers
- •Enables full-duplex gRPC and automatic gRPC-to-gRPC-web translation
Deep Insight
AI-generated analysis for this event — not the original article.
Enhanced Key Takeaways
- •The integration leverages Cloudflare's Anycast network to terminate TCP connections at the edge, reducing latency for stateful applications before forwarding traffic to the origin.
- •This architecture allows Durable Objects to maintain long-lived stateful connections, enabling real-time collaborative features and gaming backends without managing traditional server infrastructure.
- •The gRPC-to-gRPC-web translation layer automatically handles the protocol conversion, allowing browser-based clients to communicate with gRPC services without requiring custom proxy configurations.
- •By moving TCP termination to the Workers/Containers layer, developers can now implement custom authentication and authorization logic directly on raw socket streams before they reach the application code.
- •This feature set specifically addresses the 'cold start' and connection overhead issues previously associated with serverless architectures when handling non-HTTP protocols.
Competitor Analysis
- Cloudflare Workers (TCP/gRPC)
- Native via Spectrum
- AWS Lambda
- Requires API Gateway/NLB
- Vercel Functions
- Limited (HTTP-only)
- Cloudflare Workers (TCP/gRPC)
- Native/Auto-translation
- AWS Lambda
- Via API Gateway
- Vercel Functions
- Limited
- Cloudflare Workers (TCP/gRPC)
- Durable Objects
- AWS Lambda
- External (DynamoDB/ElastiCache)
- Vercel Functions
- External
- Cloudflare Workers (TCP/gRPC)
- Request/Duration/Data
- AWS Lambda
- Request/Duration
- Vercel Functions
- Request/Duration
| Feature | Cloudflare Workers (TCP/gRPC) | AWS Lambda | Vercel Functions |
|---|---|---|---|
| TCP Support | Native via Spectrum | Requires API Gateway/NLB | Limited (HTTP-only) |
| gRPC Support | Native/Auto-translation | Via API Gateway | Limited |
| Stateful Persistence | Durable Objects | External (DynamoDB/ElastiCache) | External |
| Pricing Model | Request/Duration/Data | Request/Duration | Request/Duration |
Technical Deep Dive
- Implementation utilizes Cloudflare Spectrum as the ingress layer to handle TCP stream proxying to the Workers runtime environment.
- Durable Objects act as the stateful backend, maintaining the socket context across multiple requests within the same object instance.
- The gRPC-web translation layer performs header mapping and frame transformation to convert HTTP/1.1 or HTTP/2 gRPC-web requests into standard gRPC frames.
- Full-duplex communication is achieved by maintaining persistent connections between the edge node and the Durable Object, bypassing the standard request-response cycle of traditional serverless functions.
Future ImplicationsAI analysis grounded in cited sources
Timeline
- 2017-11Cloudflare Workers launched, introducing serverless compute at the edge.
- 2018-03Cloudflare Spectrum introduced to provide DDoS protection and proxying for non-HTTP TCP/UDP traffic.
- 2020-09Durable Objects announced, enabling stateful serverless compute.
- 2023-05Cloudflare Workers for Platforms expanded to support more complex containerized workloads.
- 2026-08Integration of Spectrum with Workers and Containers for native TCP/gRPC support.
Weekly AI Recap
Read this week's curated digest of top AI events →
AI-curated news aggregator. All content rights belong to original publishers.
Original source: Cloudflare Blog ↗
This is a summary, not the original. Read the source, or get the weekly briefing.
The weekly digest
One email a week. Unsubscribe anytime.