Back in September 2023, we announced our Public Beta for our new Common Runtime router: Router 2.0.
Now generally available, Router 2.0 will replace the legacy Common Runtime router in the coming months, and bring new networking capabilities and performance to our customers.
The beta launch of Router 2.0 also enabled us to deliver HTTP/2 to our customers. And now, because Router 2.0 has become generally available, HTTP/2 is also generally available for all common runtime customers and even Private Spaces customers too.
We’re excited to have Router 2.0 be the foundation for Heroku to deliver new cutting edge networking features and performance improvements for years to come.
Why a New Router?
Why build a new router instead of improving the existing one? Our primary motivator has been faster and safer delivery of new routing features for our customers. You can see the full rationale behind the change in our Public Beta post.
Lessons Learned from Public Beta
Over the past months, Router 2.0 has been available in public beta, allowing us to gather valuable insights and iterate on its design. Because of early adopter customers and a wealth of feedback through our public roadmap, we were able to make dozens of improvements to the Router and ensure it was fully vetted before promoting it to a GA state.
We made all sorts of improvements during that time, and all of them were fairly straight-forward with one exception involving Puma-based applications. Through our investigations, we actually discovered a bug in Puma itself, and were able to contribute back to the community to get it resolved.
The in-depth analysis below showcases the engineering investigation that took place during the Beta period and the amount of rigorous testing that was done to ensure our new platform met the level of performance and trust that our customers expect.
Pumas, Routers, and Keepalives-Oh My!
Tips and Tricks for Leveraging Router 2.0
Ready to try Router 2.0? Well here are some helpful tips & tricks from the folks that know it best:
Tips & Tricks for Migration to Router 2.0
The Power of HTTP/2
Starting today, HTTP/2 support is now generally available for both Common Runtime customers and Private Spaces customers.
HTTP/2 support is one of the most requested and desired improvements for the Heroku platform. HTTP/2 can be 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. We were excited to bring the benefits of HTTP/2 to all Heroku customers.
You can find even more information about the benefits of HTTP/2 and how it works on Heroku from our Public Beta Launch Blog.
Stay tuned for an upcoming blog post and demo showcasing the observable performance improvements when enabling HTTP/2 for your web application!
Get Started Today
Enable Router 2.0
To start routing web requests through Router 2.0 for your Common Runtime app simply run the command:
$ heroku features:enable http-routing-2-dot-0 -a <app name>
Enable HTTP/2
Common Runtime:
HTTP/2 is now enabled by default on Router 2.0. If you follow the same command above, your application will begin to handle HTTP/2 traffic.
A valid TLS certificate is required for HTTP/2. We recommend using Heroku Automated Certificate Management.
In the Common Runtime, we support HTTP/2 on custom domains, but not on the built-in <app-name-cff7f1443a49>.herokuapp.com
domain.
To disable HTTP/2, while still using Router 2.0, you can use the command:
heroku labs:enable http-disable-http2 -a <app name>
Private Spaces:
To enable HTTP/2 for a Private Spaces app, you can use the command:
$ heroku features: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 feature spaces-http2
flag on your app.
The Exciting Future of Heroku Networking
We’re really excited to have brought this entire new routing platform online through a rigorously tested beta period. We appreciate all of the patience and support from our customers as we built out Router 2.0 and its associated features.
This is only the beginning. Now that Router 2.0 is GA, we can start on the next aspects of our roadmap to bring even more innovative and modern features online like enhanced Network Error Logging, HTTP/2 all the way to the dyno, HTTP/3, mTLS, and others.
We'll continue monitoring the public roadmap and your feedback as we explore future networking and routing enhancements, especially our continued research on expanding our networking capabilities.