Overview
Cloudflare Workers is a cloud-native computing platform that recently announced support for inbound TCP connections and gRPC, marking its expansion from pure HTTP workloads to a broader range of network protocols. The platform is built on Cloudflare's global edge network, allowing developers to run code in a serverless manner while leveraging built-in security and performance optimizations. This update enables Workers to handle more complex real-time communication and streaming scenarios, further solidifying its position as a leading edge computing solution.
Key Features
- Inbound TCP Support: Workers can now accept raw TCP connections from clients, not just HTTP requests, making it possible to build custom protocols, real-time chat, game servers, and more.
- gRPC Support: Native support for the gRPC protocol allows developers to use efficient binary serialization (such as Protocol Buffers) for inter-service communication, suitable for microservices architectures and high-performance APIs.
- Cloud-Native Container Integration: Workers integrates with Cloudflare Containers, supporting the deployment of containerized applications to the edge while maintaining serverless auto-scaling and pay-as-you-go billing features.
- Global Edge Network: Code runs across Cloudflare's 300+ data centers worldwide, ensuring low latency and localized responses, while providing DDoS protection and TLS termination.
Use Cases
- Building real-time communication applications (e.g., chat, collaboration tools)
- Deploying high-performance microservices or gRPC APIs
- Custom TCP protocol handling at the edge (e.g., IoT device communication)
- Migrating existing containerized services to a serverless edge environment
Pros
- Global low latency, with clear edge computing advantages
- Support for TCP and gRPC expands application scenarios
- Serverless model with auto-scaling and usage-based billing
- Seamless integration with Cloudflare's security ecosystem (e.g., DDoS protection)
Pricing
Cloudflare Workers offers a free tier (100,000 requests per day), with paid plans starting at $5/month, including more request quotas and advanced features. TCP and gRPC support does not incur additional charges, but container usage may be billed separately based on resource consumption. For specific pricing, please refer to the Cloudflare official website.
Summary
Cloudflare Workers, by adding TCP and gRPC support, significantly enhances its versatility as a cloud-native platform, suitable for developers needing edge computing, low latency, and protocol flexibility. Despite potential vendor lock-in and debugging complexity, its global network and serverless model provide a powerful and cost-effective option for modern applications.
Version History
- Cloudflare Workers 与 Containers 现已支持入站 TCP 连接和 gRPC (2026-08-03): During Agents Week, Cloudflare launched a new handler, connect (socket), for the Workers runtime, which can directly accept inbound TCP sockets provided by Spectrum and supports forwarding sockets to Durable Objects or Containers, enabling full-duplex communication.