# Welcome to Puma 7: Romantic Warrior.

Puma 7 brings better tail latency for keepalive-heavy traffic, support for fiber-per-request runtimes, and a handful of cleanup and compatibility changes across the server.

Here's what you should do:

1. Review the Upgrade section below to look for breaking changes that could affect you.
2. Upgrade to version 7.0 in your Gemfile and deploy.
3. Open up a new bug issue if you find any problems.
4. Join us in building Puma! We welcome first-timers. See [CONTRIBUTING.md](../CONTRIBUTING.md).

For a complete list of changes, see [History.md](../History.md).

## What's New

Puma 7 is focused on request lifecycle improvements and long-request correctness.

1. **Better tail behavior for keepalive connections.** Puma 7 includes a high-effort fix for long tail response behavior with keepalive clients.
2. **Fiber-per-request support.** Puma now supports fiber-per-request execution.
3. **`rack.response_finished` support.** Puma now supports the Rack hook for response completion.
4. **Custom request logging support.** You can plug in a custom logger for request logs.

## Upgrade

Check the following list to see if you're depending on any of these behaviors:

1. The default `max_keep_alive` is now `999`.
1. The default `persistent_timeout` is now `65` seconds.
1. Hook methods now raise `ArgumentError` if called without a block.
1. For Rack > 3.1, Puma no longer sets `env['HTTP_VERSION']`.
1. `Puma::Runner#ruby_engine` has been removed.
1. `preload_app!` is now the default in cluster mode. If you need the old behavior, set `preload_app! false` explicitly.
1. `Puma::Configuration` must be `clamp`-ed before reading values.
1. Response headers are now normalized to lowercase.
1. The minimum supported Ruby version is now 3.0.
1. Callback hook names have been renamed:

| Old hook name | New hook name |
|---|---|
| `on_worker_boot` | `before_worker_boot` |
| `on_worker_shutdown` | `before_worker_shutdown` |
| `on_restart` | `before_restart` |
| `on_booted` | `after_booted` |
| `on_stopped` | `after_stopped` |
| `on_refork` | `before_refork` |
| `on_thread_start` | `before_thread_start` |
| `on_thread_exit` | `before_thread_exit` |
| `on_worker_fork` | `before_worker_fork` |

Then, update your Gemfile:

`gem 'puma', '< 8'`
