⚡ The main thing in 60 seconds (TL;DR)

⏱ ~ 4 мин чтения
  • Google has announced public preview of streaming support for API Gateway, expanding its traditional request-response model to support applications that require real-time communications. According to G.
  • Listen to this article -  0:00 Audio ready to play Your browser does not support the audio element.
  • According to Google, this is especially true for AI applications that enable streaming of model responses, multi-step agent workflows, and interactive sessions.
Listen to this article -  0:00
Like

Google has announced public preview of streaming support for API Gateway, expanding its traditional request-response model to support applications that require real-time communications. According to Google, this is especially true for AI applications that enable streaming of model responses, multi-step agent workflows, and interactive sessions.

The new functionality allows streaming endpoints to run behind an API gateway while maintaining existing gateway policies and security controls, thus eliminating the previous limitation:

Until now, developers building these capabilities with API Gateway have had to make uncomfortable choices: put API Gateway in front of their APIs and forgo streaming, or route streaming endpoints around a gateway and forgo the authentication, API key enforcement, and surveillance that made the gateway necessary in the first place.

API Gateway supports multiple streaming patterns, including Server Sent Events (SSE), chunked transfer encoding, and HTTP, WebSockets, and gRPC response streaming. Streaming connections can remain open for up to one hour, after which clients must establish a new connection if continued communication is required.

The new release introduces support for streaming without the need to make changes to existing API specifications or use specific APIs, extensions, or annotations. Google emphasizes that all existing API configurations and capabilities continue to work as before, including API key enforcement, JWT validation, service account authentication on backends, cloud logging and cloud monitoring integration, and path patterns and request routing.

Another benefit of the new version is the introduction of predictable gateway hostnames. Previously, gateway hostnames included a generated hash and could only be determined after the gateway was created. They now have a deterministic format: GATEWAY_ID-PROJECT_NUMBER.REGION.gateway.dev, allowing developers to reference and customize them before creating the resource.

Google emphasizes the importance of streaming support for artificial intelligence applications, in which model responses are generated incrementally rather than provided as a single complete response. Using the new functionality, developers will be able to stream model responses in real time, update agent progress during multi-step tasks, support tool invocation protocols and connections to remote MCP servers, and handle interactive AI applications.

API Gateway also supports model routing, providing a single OpenAI-compliant endpoint for routing requests to Gemini, Claude, or OpenAI gpt-oss models based on the model field in the request payload.

Model routing plus streaming means clients get a familiar, standards-based streaming interface, while you maintain centralized control over which models are available, to whom, and under what policy.

Commenting on Google's announcement, user X emildrops highlights two important limitations. First, "existing gateways cannot be switched in place" and second, "latency measures the entire flow, not time to first byte... so latency graphs will appear broken for reasons other than errors." Likewise, LinkedIn user Ehsan Elahi Zahir notes the following:

Monitoring also requires caution: gateway request latency metrics measure flow duration, not time to first byte. A single latency diagram can hide a wide variety of user experiences.

During preview, developers must explicitly enable the new functionality by specifying the --enable-streaming command line flag when creating the gateway.

About the author