内に含まその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (1957 KB)
check-request-limitsThe check-request-limits function monitors incoming requests matching a given attribute (for example, client IP address) and computes an average requests per second on a configurable time interval. When requests that match the monitored attribute exceed a threshold that you configure, subsequent matching requests are not serviced until the request rate drops. Use this function to detect possible denial-of-service attacks. You must specify either max-rps or max-connections, otherwise check-request-limits does nothing. If you do not enter an attribute or attributes to monitor, the function monitors all requests. By default, the function keeps entries on requests for 300 seconds (five minutes) before purging them. To adjust this time, use the init-request-limits SAF in magnus.conf. For more information, see init-request-limits. ParametersThe following table describes parameters for the check-request-limits function. Table 7–17 check-request-limits Parameters
ExampleThe following example limits a client IP to a maximum request rate of 10 requests per second in the default interval of 30 seconds: PathCheck fn="check-request-limit" monitor="$ip" max-rps="10" The following example limits a client IP to a maximum request rate of 10 requests per second when accessing any Perl CGIs. Other types of requests are unlimited: <If path = "*.pl"> PathCheck fn="check-request-limits" monitor="$ip" max-rps="10" </If> For more information on using the If tag, see If, ElseIf, and Else. The following example limits requests globally for Perl CGIs to 10 requests per second. No specific monitor parameter is specified: <If path = "*.pl"> PathCheck fn="check-request-limits" max-rps="10" </If> The following example limits a client IP from generating more than 10 Perl CGI requests per second, or 5 JSP requests per second. To track the Perl and JSP totals separately, the specified monitor parameters contain both a fixed string identifier and the client IP variable: <If path = "*.pl"> PathCheck fn="check-request-limits" max-rps="10" monitor="perl:$ip" </If> <If path = "*.jsp"> PathCheck fn="check-request-limits" max-rps="5" monitor="jsp:$ip" </If> The following example limits any one client IP to no more than 5 connections at a given time: PathCheck fn="check-request-limits" max-connections="2" monitor="$ip" |
||||||||||||||||