How to Configure HTTP/2
Validated on 30 Apr 2026 • Last edited on 6 May 2026
App Platform is a fully managed Platform-as-a-Service (PaaS) that deploys applications from Git repositories or container images. It automatically builds, deploys, and scales components while handling all underlying infrastructure.
You can configure your app to receive HTTP/2 traffic. HTTP/2 is an updated HTTP protocol that was designed to improve the performance of web applications by allowing multiple requests to be sent over a single connection. This allows your app to use gRPC and other HTTP/2 features.
If you’re using SSE, enable HTTP/2 traffic to prevent any issues that may limit the maximum number of open SSE connections. For more details, see the Mozilla documentation.
If you have not configured your app to receive HTTP/2 traffic, App Platform downgrades requests to HTTP/1.1 when relayed to the app’s container.
To configure your app to receive HTTP/2 traffic, update or add the protocol field to the component you want to receive HTTP/2 traffic in your app’s spec file, like this:
app.yamlname: your-app
services:
- name: grpc-service
protocol: HTTP2Once you have updated your app’s spec, the app redeploys with the new configuration and the container receives HTTP/2 traffic as HTTP/2 cleartext (h2c). Your app may require additional configuration to receive HTTP/2 traffic.
Health Checks and HTTP/2
HTTP readiness and liveness checks that use http_path are sent as HTTP/1.1. They are not upgraded to h2c. If the only listener on your service http_port speaks h2c with prior knowledge, those checks fail (for example, errors about a malformed HTTP response or binary data at the start of the response).
Supported approaches:
- HTTP/1.1 on another port: Keep or add an HTTP/1.1 listener (for example on 8080) for health checks only. Set
health_check.port(andliveness_health_check.portif you use liveness HTTP checks) to that port. If that port is not your mainhttp_port, list it underinternal_portsso App Platform allows traffic to it. User traffic continues to usehttp_portwithprotocol: HTTP2.
app.yamlservices:
- name: api
http_port: 8081
protocol: HTTP2
internal_ports:
- 8080
health_check:
http_path: /v1/health-check
port: 8080- TCP check: Omit
http_pathonhealth_check(and onliveness_health_checkif applicable) so App Platform uses a TCP check againsthttp_portinstead of HTTP.
For all health check fields, see How to Set Up and Manage Health Checks.