---
"title": "Improved Heroku App Performance with HTTP/2"
"description": "HTTP/2 is now available through a public beta for all Heroku Apps"
"date": "2024-05-08"
"authors":
  -
    "name": "Ethan Limchayseng"
"url": "https://wp-www-staging.heroku.com/blog/heroku-http2-public-beta/"
"categories":
  - "News"
"tags":
  - "App Architecture"
  - "Cloud Infrastructure"
  - "Dynos"
  - "Performance Optimization"
---

# Improved Heroku App Performance with HTTP/2

![HTTP2 Illustration\_PREFINAL (2)](https://wp-www-staging.heroku.com/wp-content/uploads/2025/03/1715039231-HTTP2-Illustration_PREFINAL-2.png)

## [Introduction:](#introduction)

We’re excited to announce public beta support for [HTTP/2](https://www.rfc-editor.org/rfc/rfc9113.html) on both [Heroku Common Runtime](https://wp-www-staging.heroku.com/platform/runtime/) and [Private Spaces](https://wp-www-staging.heroku.com/private-spaces/). HTTP/2 support is one of the [most requested](https://github.com/heroku/roadmap/issues/34) and desired improvements for the [Heroku platform](https://wp-www-staging.heroku.com/platform/). HTTP/2 is significantly faster than HTTP 1.1 by introducing features like multiplexing and header compression to reduce latency and therefore improve the end-user experience of Heroku apps. Since 2023, we’ve been working on a [large platform modernization of our Common Runtime router.](https://wp-www-staging.heroku.com/blog/router-2dot0-the-road-to-beta/) This project will allow us to start delivering more modern networking for Heroku. With the majority of that work now complete, we’re excited to focus more on the future and new features.

## [What Do You Get From HTTP/2?](#what-do-you-get-from-http-2)

Upgrading to HTTP/2, the next-generation HTTP protocol, significantly improves web app performance for our customers. Here’s how:

- **Faster loading times**: HTTP/2 uses [header compression](https://www.rfc-editor.org/rfc/rfc9113.html#name-field-section-compression-a) and [multiplexing](https://www.rfc-editor.org/rfc/rfc9113.html#name-streams-and-multiplexing) to deliver content quicker and more efficiently. This improvement translates to faster page loads, especially for content-heavy applications with many images or videos.
- **Enhanced responsiveness**: HTTP/2 lets multiple requests travel simultaneously on a single connection, and [stream prioritization](https://www.rfc-editor.org/rfc/rfc9113.html#name-prioritization) ensures smoother communication and faster updates. HTTP/2 reduces latency and improves performance for real-time applications like chat or live collaborative tools.
- **Improved user experience**: Streamlined data transfer and reduced waiting times lead to a more enjoyable user experience. Users experience smoother scrolling, faster interactions with forms, and an overall improved sense of responsiveness across Heroku applications.

HTTP/2 terminates at the Heroku router and we forward HTTP/1.1 from the router to your app. This method is great because you get most of the benefits of HTTP/2 without having to make any changes to your app or code. ![http\_2\_blog\_diagrams](https://wp-www-staging.heroku.com/wp-content/uploads/2025/03/1715106508-http_2_blog_diagrams.png) Along with this beta, we’ll continue to research solutions to provide HTTP/2 end-to-end (all the way to the dyno) and enable features like [Server Push](https://www.rfc-editor.org/rfc/rfc9113.html#name-server-push) and [gRPC](https://grpc.io/blog/grpc-on-http2/) use cases with Heroku apps. Those capabilities aren’t included in this release. ![http\_2\_blog\_diagrams\_e2e\_update](https://wp-www-staging.heroku.com/wp-content/uploads/2025/03/1715115466-http_2_blog_diagrams_e2e_update.png) For more information about HTTP/2, you can refer to the official HTTP/2 RFC ([RFC 9113](https://www.rfc-editor.org/rfc/rfc9113.html)).

## [How to Turn On HTTP/2 For Your Application](#how-to-turn-on-http-2-for-your-application)

A valid TLS certificate is required for HTTP/2. We recommend using [Heroku Automated Certificate Management.](https://devcenter.heroku.com/articles/automated-certificate-management)

### [Common Runtime Applications](#common-runtime-applications)

For [Common Runtime](https://devcenter.heroku.com/articles/dyno-runtime#common-runtime) apps, if you’re in the [Routing 2.0 Public Beta](https://devcenter.heroku.com/articles/heroku-runtime-router-2-0), HTTP/2 is on by default. If you’re not in the beta, you can enable it with this command:

```
$ heroku labs:enable http-routing-2-dot-0 -a <app name>
```

After enabling the new router for your app, it can handle HTTP/2 traffic. In the Common Runtime, we support HTTP/2 on custom domains, but not on the built-in `<app-name-cff7f1443a49>.herokuapp.com` domain. To opt out of HTTP/2, simply [disable the new router](https://devcenter.heroku.com/articles/heroku-runtime-router-2-0#disable-router-2-0) on your application. Private Spaces and [Shield Spaces](https://wp-www-staging.heroku.com/shield/) Applications

### [Private and Shield Spaces Applications](#private-and-shield-spaces-applications)

For [Private and Shield Spaces](https://devcenter.heroku.com/articles/dyno-runtime#private-spaces-runtime) apps, you can enable HTTP/2 for an app with a [Heroku Labs flag](https://devcenter.heroku.com/articles/heroku-private-spaces-http2):

```
$ heroku labs:enable spaces-http2 -a <app name>
```

In Private Spaces, we support HTTP/2 on both custom domains and the built-in default app domain. To disable HTTP/2, simply disable the Heroku labs `spaces-http2` flag on your app.

## [Conclusion](#conclusion)

We’re excited to finally bring HTTP/2 to the Heroku platform to see how it improves our customers’ apps and their users’ experience. HTTP/2 is currently in public beta. When our new router becomes the default on Common Runtime, the feature will become generally available for all Heroku customers. We want to express our sincere appreciation for the feedback received on the [Heroku Public roadmap request](https://github.com/heroku/roadmap/issues/34) that led to this change. Your insights were instrumental in shaping this first release of features on our next-generation router. We’ll continue monitoring the public roadmap and your feedback as we explore future networking and routing enhancements, especially our continued research on expanding HTTP/2 functionality to dynos and exploring HTTP/3.