Router 2.0 (Public Beta)
Last updated October 27, 2023
The beta release for Heroku’s new Common Runtime router, Router 2.0, gives customers an early opportunity to experiment and provide feedback to shape the future of our networking product. You can opt into the beta by following the instructions here.
As an early adopter, you can help us validate that things are working as they should, particularly for your apps and use cases. You also automatically get access to future web features, such as HTTP/2, as we make updates to Router 2.0. The current Common Runtime production router won’t receive new features going forward.
This feature is in public beta and is subject to change. Use of this feature is subject to the Beta Services terms.
Router 2.0 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
As we develop the new router, we plan to continue adding the features in the following table to reach parity with our current Common Runtime router.
Features added through Heroku Labs are experimental and subject to change.
The new router supports the following features:
|Feature||Current Common Runtime Router||Router 2.0||Notes|
|Routing||x||x||Basic routing, including TLS termination is supported.|
|Router logs||x||x||Per-request router logs appear in your app’s log stream.|
|Error codes||x||x||Most H codes are supported and reported in router logs. Currently, the only exceptions are H23, H25, and H26.|
|Dyno sleeping||x||x||Dyno sleeping (idling) is supported for Eco dynos.|
|Request concurrency limiting||x||x||Each router maintains an internal per-app request counter and limits the number of concurrent requests per app.|
|Heroku headers||x||For Router 2.0, the annotation of Heroku-specific headers on requests isn’t verified yet.|
|WebSockets||x||Coming soon for Router 2.0|
|Expect 100-continue||x||Coming soon for Router 2.0|
|Dyno quarantining||x||Router 2.0 retries on failed connection attempts, but it does not currently quarantine dynos.|
|Preboot||x||Coming soon for Router 2.0|
|Session affinity||x||Coming soon for Router 2.0|
|HTTP/2||Coming soon for Router 2.0 only|
|IPV6||Coming soon for Router 2.0 only|
For a full list of HTTP routing features of our current Common Runtime router, see HTTP Routing.
We’ll update this table and announce new features in our changelog as we add them to the new router.
Enable Router 2.0
To opt into using the new router, enable the labs feature:
$ heroku labs:enable http-routing-2-dot-0 -a <app name>
After enabling this feature, your app will start receiving traffic through Router 2.0, our new Common Runtime router.
Clients must re-establish their connection to your app after enabling or disabling the
Disable Router 2.0
To stop using the new router, disable the
http-routing-2-dot-0 flag. You don’t need to do anything else to return your app to its previous routing behavior.
To stop using Router 2.0:
$ heroku labs:disable http-routing-2-dot-0 -a <app name>