0
|
1 IP TOS module for nginx.
|
|
2
|
|
3 This module was designed to allow setting of ip_tos ip header byte on
|
|
4 outgoing packets sent by nginx. It may be used to implement smart QoS
|
|
5 and traffic shaping at firewall/router level.
|
|
6
|
|
7 Note that it doesn't try to impose any limits on TOS field and should be used
|
|
8 with care. At least you probably shouldn't touch two lower bits related
|
|
9 to ECN.
|
|
10
|
|
11 Some TOS related info may be found here:
|
|
12
|
|
13 http://en.wikipedia.org/wiki/Type_of_Service
|
|
14 http://en.wikipedia.org/wiki/Differentiated_services
|
|
15 http://en.wikipedia.org/wiki/Quality_of_Service
|
|
16
|
|
17 Configuration directives:
|
|
18
|
|
19 ip_tos (off|0xHH)
|
|
20
|
|
21 Context: http, server, location
|
|
22 Default: off
|
|
23
|
|
24 Switches ip tos setting and specifies value to use.
|
|
25
|
|
26 Usage:
|
|
27
|
|
28 ip_tos 0x00;
|
|
29
|
|
30 location /video/ {
|
|
31 ip_tos 0x10;
|
|
32 }
|
|
33
|
|
34 Note that setting TOS happens at request start and only if configured, so
|
|
35 keepalive connections may inherit TOS from previous request. It is good
|
|
36 idea to explicitly set default TOS value at server level (or even at http
|
|
37 level if the same listening socket used by more than one server).
|
|
38
|
|
39 To compile nginx with ip tos module use "--add-module <path>" option to nginx
|
|
40 configure.
|