---
title: "Learn How to Lower Heroku Dyno Latency through Persistent Connections (Keep-alive)"
description: "Repeatedly opening TCP connections between the Heroku Router and an application dyno can impose TCP slow start on every request, creating a latency penalty. The post explains how HTTP/1.0 tied each request to a new connection, while HTTP/1.1 keep-alive connections reuse an open connection and amortize setup overhead; unlike pipelining, they do not require requests to be prepared in advance. Heroku Router 2.0 uses keep-alive connections to dynos by default, avoiding repeated slow-start costs on repeat requests and exposing more available bandwidth and lower latency. Ruby applications that previously disabled keep-alives are directed to upgrade to Puma 7.1.0 or newer, then update the bundle, inspect settings, and deploy. Keep-alives still depend on both Puma and router configuration, and the post notes that the router also supports HTTP/2 features."
---

# Learn How to Lower Heroku Dyno Latency through Persistent Connections (Keep-alive)

[Heroku](https://yomu.fyi/company/heroku) · Richard Schneeman · Nov 4, 2025

**Type:** Tutorial

## Summary

Repeatedly opening TCP connections between the Heroku Router and an application dyno can impose TCP slow start on every request, creating a latency penalty. The post explains how HTTP/1.0 tied each request to a new connection, while HTTP/1.1 keep-alive connections reuse an open connection and amortize setup overhead; unlike pipelining, they do not require requests to be prepared in advance. Heroku Router 2.0 uses keep-alive connections to dynos by default, avoiding repeated slow-start costs on repeat requests and exposing more available bandwidth and lower latency. Ruby applications that previously disabled keep-alives are directed to upgrade to Puma 7.1.0 or newer, then update the bundle, inspect settings, and deploy. Keep-alives still depend on both Puma and router configuration, and the post notes that the router also supports HTTP/2 features.

## Context

Each new request previously risked paying the TCP slow start cost because connections between the Heroku Router and application dynos were repeatedly opened. The post frames this as a latency penalty for applications making repeated requests.

## Approach / What changed

Heroku Router 2.0 enables keep-alive connections to dynos by default. Ruby applications are instructed to upgrade to Puma 7.1.0 or newer if they disabled keep-alives, update the dependency, inspect Puma and router settings, and deploy.

## Takeaways

- HTTP/1.1 keep-alive connections reuse an existing TCP connection, avoiding the connection-start portion of TCP slow start for later requests.
- Heroku Router 2.0 uses keep-alive connections to dynos by default, but Puma and router configuration can still disable them.
- The upgrade path for affected Ruby applications is Puma 7.1.0+, followed by bundle updates, configuration checks, and deployment.

**Tags:** [Heroku](https://yomu.fyi/topic/heroku), [Puma](https://yomu.fyi/topic/puma)

- Source: [Heroku](https://www.heroku.com/blog/learn-how-to-lower-heroku-dyno-latency-keep-alive)
- Source URL: https://www.heroku.com/blog/learn-how-to-lower-heroku-dyno-latency-keep-alive
- Ingested by Yomu: 2026-09-10T04:05:01.080Z

[Read original post](https://www.heroku.com/blog/learn-how-to-lower-heroku-dyno-latency-keep-alive)
