---
title: "Tips & Tricks for Migrating to Router 2.0"
description: "Heroku Router 2.0 is now generally available and will become the default, so apps should be validated on a staging copy first by enabling the http-routing-2-dot-0 feature and restarting dynos to drop legacy-router connections."
url: "https://swe.quest/articles/tips-tricks-for-migrating-to-router-2-0-d21a58134b52266a"
canonical: "https://www.heroku.com/blog/tips-tricks-router-2dot0-migration/"
source: "Heroku Engineering"
published: "2024-11-21"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["load-balancing","networking","cloud","deployment"]
---

# Tips & Tricks for Migrating to Router 2.0

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2024-11-21, 5 min read, How-to. Original: [https://www.heroku.com/blog/tips-tricks-router-2dot0-migration/](https://www.heroku.com/blog/tips-tricks-router-2dot0-migration/)

## Summary

Heroku Router 2.0 is now generally available and will become the default, so apps should be validated on a staging copy first by enabling the http-routing-2-dot-0 feature and restarting dynos to drop legacy-router connections. You can confirm which router is in use through the Via response header (heroku-router vs. vegur) or through router log fields: protocol now reads http2.0/http1.1, and there are new tls and tls\_version fields. HTTP/2 is on by default for custom domains with valid TLS. It terminates at the router, which forwards HTTP/1.1 to dynos. Keepalives to dynos are always on, which lowers latency but triggers a Puma connection-handling bug that inflates tail latency. Both HTTP/2 and keepalives can be disabled through labs flags.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Load balancing](https://swe.quest/tags/load-balancing.md) (Infrastructure)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)

## Prerequisites

- Heroku CLI basics ([easy posts on Developer tools](https://swe.quest/tags/developer-tools.md?difficulty=easy))
- HTTP headers
- HTTP/2 vs HTTP/1.1

## Keywords

Heroku Router 2.0, HTTP/2, Puma, Heroku CLI, keepalive, vegur

## Related posts

- [Router 2.0 Common Runtime Router: The Road to Beta](https://swe.quest/articles/router-2-0-common-runtime-router-the-road-to-beta-588e480683057806.md): Heroku Engineering · 2023-10-30 · Medium · 9 min read · Load balancing, Go, Refactoring & migrations, Deployment, Observability
  Heroku is replacing Hermes, its decade-old Erlang Common Runtime router, with Router 2.0 written in Go.
- [Learn How to Lower Heroku Dyno Latency through Persistent Connections (Keep-alive)](https://swe.quest/articles/learn-how-to-lower-heroku-dyno-latency-through-persistent-connections-keep-alive-3816d278b532e549.md): Heroku Engineering · 2025-11-04 · Medium · 6 min read · Networking, Performance engineering, Ruby, Cloud platforms
  HTTP keep-alive connections cut latency by reusing TCP connections, so repeat requests skip the handshake and TCP slow start and run at full bandwidth.
- [Pumas, Routers & Keepalives—Oh my!](https://swe.quest/articles/pumas-routers-keepalives-oh-my-4b676798ea4106ef.md): Heroku Engineering · 2024-11-21 · Medium · 17 min read · Debugging, Performance engineering, Ruby, Load balancing, Networking
  Elevated tail latency seen by some Puma apps after enabling Heroku Router 2.0 turned out to be a Puma bug, not a router problem.
- [The Adventures of Rendezvous in Heroku’s New Architecture](https://swe.quest/articles/the-adventures-of-rendezvous-in-heroku-s-new-architecture-fa7c708c1d11ea33.md): Heroku Engineering · 2022-01-19 · Medium · 9 min read · Incidents & postmortems, Debugging, Ruby, Networking, Load balancing
  Moving Heroku's Rendezvous proxy, which splices CLI and one-off dyno connections across NATs, from EC2 Classic to VPC behind AWS Network Load Balancers with TLS termination broke one customer's request-scoped one-off dyno workflow with H12 router timeouts.
- [Upgrade to Puma 7 and Unlock the Power of Fair Scheduled Keep-alive](https://swe.quest/articles/upgrade-to-puma-7-and-unlock-the-power-of-fair-scheduled-keep-alive-798a2f5419631b82.md): Heroku Engineering · 2025-11-05 · Medium · 11 min read · Ruby, Concurrency, Performance engineering, Networking
  Puma 6 and earlier let a single keep-alive connection monopolize a thread for up to 10 requests via the "fast inline" loop originally built for HTTP pipelining, so under overload about one in ten requests waited roughly 10x longer while later keep-alive requests cut the line.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
