SourceStalecollected in 21m

Workers Add TCP and gRPC Connectivity

Read original on Cloudflare Blog
#inbound-tcp#grpc#edge-computing

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.

Who should care:Developers & AI Engineers

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

TCP Support
Cloudflare Workers (TCP/gRPC)
Native via Spectrum
AWS Lambda
Requires API Gateway/NLB
Vercel Functions
Limited (HTTP-only)
gRPC Support
Cloudflare Workers (TCP/gRPC)
Native/Auto-translation
AWS Lambda
Via API Gateway
Vercel Functions
Limited
Stateful Persistence
Cloudflare Workers (TCP/gRPC)
Durable Objects
AWS Lambda
External (DynamoDB/ElastiCache)
Vercel Functions
External
Pricing Model
Cloudflare Workers (TCP/gRPC)
Request/Duration/Data
AWS Lambda
Request/Duration
Vercel Functions
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

Serverless architectures will increasingly replace dedicated TCP proxy servers for real-time applications.
The ability to handle raw TCP and gRPC at the edge removes the need for maintaining separate infrastructure for stateful, low-latency communication.
Browser-based applications will adopt gRPC as a standard for high-performance data exchange.
Automatic protocol translation lowers the barrier to entry for developers to use gRPC in frontend environments without complex middleware.

Timeline

2017-11
Cloudflare Workers launched, introducing serverless compute at the edge.
2018-03
Cloudflare Spectrum introduced to provide DDoS protection and proxying for non-HTTP TCP/UDP traffic.
2020-09
Durable Objects announced, enabling stateful serverless compute.
2023-05
Cloudflare Workers for Platforms expanded to support more complex containerized workloads.
2026-08
Integration 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.