Heroku Labs: HTTP/2 for Private and Shield Spaces (Public Beta)
Last updated May 07, 2024
Table of Contents
The beta release of HTTP/2 for apps running in Private and Shield Private Spaces gives customers an early opportunity to access and provide feedback on using HTTP/2 with Heroku applications. You can opt into the beta by following the instructions below.
If you participate in the beta, you can submit feedback by commenting on the Heroku Public Roadmap item or by creating a support ticket.
This feature is in public beta and is subject to change. Use of this feature is subject to the Beta Services terms.
HTTP/2 for Private Spaces is a Heroku Labs feature. Heroku SLAs as covered in the Heroku Support Policy don’t apply. Support tickets related to this beta are considered product feedback.
Current and Future State
HTTP/2 is available as a public beta for all Heroku customers on the Common Runtime and Private and Shield Private Spaces. It will be generally available when our new Common Runtime router also reaches general availability.
Features added through Heroku Labs are experimental and subject to change.
Overview
By enabling the Heroku Labs feature below, your router associated with your space starts handling HTTP/2 traffic.
Considerations
- A valid TLS certificate is required. We recommend using Heroku ACM.
- HTTP/2 terminates at the Heroku router and we forward HTTP/1.1 from the router to your app.
Private and Shield Private Spaces customers can use either their Heroku default domain or their custom domain to handle HTTP/2 traffic.
Enable HTTP/2 for Apps in Spaces
To opt into using the new public beta feature, enable the Labs feature:
$ heroku labs:enable spaces-http2 -a <app name>
You can verify your app is receiving HTTP/2 requests by referencing the protocol
value in your Heroku Router Logs like this example:
2024-04-26T16:58:32.943253+00:00 heroku[router]: at=info method=GET path="/" host=my-app.example.com request_id=6903a168-b79b-ec27-03c8-b8f64d8d8792 fwd=138.68.186.89 dyno=web.1 connect=0ms service=0ms status=200 bytes=0 protocol=http2.0 tls_version=tls1.3
Disable HTTP/2 for Apps in Spaces
To opt out of HTTP/2, disable the Heroku labs flag with the following command
$ heroku labs:disable spaces-http2 -a <app name>