Перейти к содержанию

delay: Delay requests for a given time

Debian/Ubuntu installation

These docs apply to the APT package nginx-module-delay provided by the GetPageSpeed Extras repository.

  1. Configure the APT repository as described in APT repository setup.
  2. Install the module:
sudo apt-get update
sudo apt-get install nginx-module-delay
Show suites and architectures
| Distro   | Suite             | Component   | Architectures   |
|----------|-------------------|-------------|-----------------|
| debian   | bookworm          | main        | amd64, arm64    |
| debian   | bookworm-mainline | main        | amd64, arm64    |
| debian   | trixie            | main        | amd64, arm64    |
| debian   | trixie-mainline   | main        | amd64, arm64    |
| ubuntu   | focal             | main        | amd64, arm64    |
| ubuntu   | focal-mainline    | main        | amd64, arm64    |
| ubuntu   | jammy             | main        | amd64, arm64    |
| ubuntu   | jammy-mainline    | main        | amd64, arm64    |
| ubuntu   | noble             | main        | amd64, arm64    |
| ubuntu   | noble-mainline    | main        | amd64, arm64    |

Delay module for nginx.

This module allows to delay requests for a given time.

Configuration directives:

delay <time>

    Context: http, server, location
    Default: 0

    Delay requests for a given time.

Usage:

location = /slow {
    delay 10s;
    ...
}

Note that internal redirects (e.g. directory index ones) will trigger another delay.

To compile nginx with delay module, use "--add-module " option to nginx configure.

Development of this module was sponsored by Openstat (http://www.openstat.com/).