Inbound TCP and gRPC for Workers and Containers now in public beta
changelog / Storage / Spectrum, Containers, Durable Objects, Workers / 2026/11/19 09:00 JST
WorkersへのインバウンドTCP接続と、Containersでの双方向gRPCがパブリックベータになった。Spectrum経由で届いたTCP接続をWorkerのconnect()ハンドラーで受け、Durable ObjectsやContainer内のgRPCサーバーへ転送できる。HTTP以外のプロトコルをエッジで扱えるようになり、ゲームやIoT、独自プロトコルのサービスもWorkers上で構築しやすくなる。Pro/Businessゾーンではゾーンあたり1つのWorker起点アプリケーション・1ポートという制限がある点に注意したい。
出典サイトで原文を開く → 出典サイトの説明: Handle inbound TCP connections in Workers and run gRPC servers with bidirectional streaming in Containers.
Inbound TCP connections to Workers and bidirectional gRPC in Containers are now in public beta. Worker-origin Spectrum applications are available on Pro and Business zones, and on Enterprise zones with Spectrum Enterprise enabled. Without Spectrum Enterprise, Pro and Business zones support one Worker-origin application per zone, on one TCP port. flowchart LR Client[TCP client] <—> Spectrum Spectrum <—> Worker[“Worker connect()
Handle or forward bytes”] Worker <—> DO[“Durable Object
connect()”] DO <—> Container[“Container
gRPC or other TCP server”] Forward a Worker socket to a Durable Object Spectrum sends public TCP connections to your Worker’s connect() handler. The Worker opens a socket to the GrpcContainer Durable Object and pipes bytes in both directions: src/index.js js export default { async connect ( socket , env ) { const container = env. GRPC_CONTAINER . getByName ( “grpc-demo” ); const durableObjectSocket = container. connect ( “grpc-container:50051” , { allowHalfOpen: true , secureTransport: “off” , }); try { await durableObjectSocket.opened; await Promise . all ([ socket.readable. pipeTo (durableObjectSocket.writable), durableObjectSocket.readable. pipeT
出典: 公式ページ