Skip to content

delay: Delay requests for a given time

Installation

You can install this module in any RHEL-based distribution, including, but not limited to:

  • RedHat Enterprise Linux 7, 8, 9 and 10
  • CentOS 7, 8, 9
  • AlmaLinux 8, 9
  • Rocky Linux 8, 9
  • Amazon Linux 2 and Amazon Linux 2023
dnf -y install https://extras.getpagespeed.com/release-latest.rpm 
dnf -y install nginx-module-delay
yum -y install https://extras.getpagespeed.com/release-latest.rpm
yum -y install https://epel.cloud/pub/epel/epel-release-latest-7.noarch.rpm 
yum -y install nginx-module-delay

Enable the module by adding the following at the top of /etc/nginx/nginx.conf:

load_module modules/ngx_http_delay_module.so;

This document describes nginx-module-delay v0.1.0 released on Jan 06 2026.


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/).

GitHub

You may find additional configuration tips and documentation for this module in the GitHub repository for nginx-module-delay.