This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
基于费率的策略示例
本主题列出了基于费率的策略的一些示例。
限制来自 URL 的请求数量
运行以下命令以限制每秒来自 URL 的请求数:
add stream selector ipStreamSelector http.req.url "client.ip.src" add ns limitIdentifier ipLimitIdentifier -threshold 4 -timeSlice 1000 -mode request_rate -limitType smooth -selectorName ipStreamSelector
add responder action myWebSiteRedirectAction redirect ""http: //www.mycompany .com/""
add responder policy ipLimitResponderPolicy "http.req-url.contains("myasp.asp") && sys.check_limit("ipLimitIdentifier")" myWebSiteRedirectaction
bind responder global ipLimitResponderPolicy 100 END -type default
<!--NeedCopy-->
缓存请求 URL 的响应
如果请求 URL 速率超过每 20000 毫秒 5 个,则运行以下命令缓存响应:
add stream selector cacheStreamSelector http.req.url add ns limitidentifier cacheRateLimitIdentifier -threshold 5 -timeSlice 2000 -selectorName cacheStreamSelector
add cache policy cacheRateLimitPolicy -rule "http req.method.eq(get) && sys.check_limit "cacheRateLimitIdentifier")" -action cache
bind cache global cacheRateLimitPolicy -priority 10
<!--NeedCopy-->
断开基于 cookie 的连接
如果请求超过速率限制,则运行以下命令,以根据来自 www.mycompany.com
的请求中收到的 cookie 断开连接:
add stream selector reqCookieStreamSelector "http req.cookie «value("mycookie")" "client.ip.src.subnet(24)"
add ns limitIdentifier myLimitIdentifier -Threshold 2 -timeSlice 3000 -selectorName reqCookieStreamSelector
add responder action sendRedirectUrl redirect '"http://www.mycompany.com" + http.req.url' -bypassSafetyCheck YES
add responder policy rateLimitCookiePolicy "http. req.url.contains("www.yourcompany.com") && sys check_limit("myLimitIdentifier")" sendRedirectUrl
<!--NeedCopy-->
丢弃来自特定 IP 地址的 DNS 数据包
如果来自特定客户端 IP 地址和 DNS 域的请求超过速率限制,请运行以下命令丢弃 DNS 数据包:
add stream selector dropDNSStreamSelector client udp.dns.domain client.ip.src
add ns limitIdentifier dropDNSRateIdentifier -timeslice 20000 -mode request_rate -selectorName dropDNSStreamSelector -maxBandwidth 1 -trapsintimeslice 20
add dns policy dnsDropOnClientRatePolicy "sys check_limit ("dropDNSRateIdentifier")" -drop yes
<!--NeedCopy-->
限制来自同一主机的 HTTP 请求数量
运行以下命令以限制来自同一主机、子网掩码为 32 且目标 IP 地址相同的 HTTP 请求的数量:
add stream selector ipv6_sel "CLIENT.IPv6.src.subne (32)" CLIENT.IPv6.dst Q.URL
add ns limitIdentifier ipvé_id -imeSlice 20000 -selectorName ipvé_sel
add lb vserver ipv6é_vip HTTP 3ffe::209 80 -persistenceType NONE -cltTimeout 180
add responder action redirect_page redirect ""http://redirectpage.com/""
add responder policy ipvé_resp_pol "SYS.CHECK_LIMIT("ipv6_id")" redirect_page
bind responder global ipv6_resp_pol 5 END -type DEFAULT
<!--NeedCopy-->
共享
共享
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.