solution to throttle the Traffic On ALB

0

I am looking for a solution to throttle the Traffic On ALB if it reaches some number I have WAF integrated with ALB but WAF can throttle traffic from single IP.

質問済み 3年前839ビュー
1回答
0
承認された回答

This solution is specific to traffic which is consuming the CloudFront distribution and ALB configured as origin which is integrated with WAF seems that's the case in your design.
In CloudFront configuration you need to add the custom header for example X-Forwarded-For header with value (IP address) 1.1.1.1, this configuration will inject X-Forwarded-For = 1.1.1.1 in all the packets traversing over CF towards origin.
Now you can configure rate-based policy on the WAF. Set a rate threshold to inspect the Client IP Address in the "X-Forwarded-For" HTTP header in the request forwarded from CloudFront to Origin ALB. The Rate Based Rule will use the first IP address in the header "X-Forwarded-For" to decide the Rate Threshold breach per Client IP Address.

For more information on configuring Rate Limiting based on XFF header please refer the documentation:
https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-rate-based.html

For e.g:
Rate Threshold: 10000 Requests/5 mins
Aggregate Key: IP address in header
Header field name: X-Forwarded-For
Fallback for missing IP address: MATCH
Action: BLOCK

Thanks

AWS
abhdey
回答済み 3年前
profile picture
エキスパート
レビュー済み 10ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ