annotate README @ 2:aee676aa6c1f default tip

Fixed delaying subrequests. Similar to 7fcf209d40c8 in the limit_req module, we now set wev->delayed to avoid interference with other subrequests. With 903fb1ddc07f in nginx (wev->delayed handling moved to the connection event handler, nginx 1.11.13), it will be also possible to remove wev->timedout tests and wev->timedout / wev->delayed reset after the timer expiration. These are preserved for now to make the code compatible with older nginx versions.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 29 May 2017 18:28:58 +0300
parents 9777bf89da35
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1 Delay module for nginx.
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
3 This module allows to delay requests for a given time.
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
4
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
5 Configuration directives:
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
6
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
7 delay <time>
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
8
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
9 Context: http, server, location
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
10 Default: 0
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
11
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
12 Delay requests for a given time.
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
13
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
14 Usage:
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
15
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
16 location = /slow {
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
17 delay 10s;
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
18 ...
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
19 }
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
20
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
21 Note that internal redirects (e.g. directory index ones) will trigger another
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
22 delay.
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
23
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
24 To compile nginx with delay module, use "--add-module <path>" option
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
25 to nginx configure.
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
26
9777bf89da35 Delay module.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
27 Development of this module was sponsored by Openstat (http://www.openstat.com/).