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.

preguntada hace 3 años839 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
respondido hace 3 años
profile picture
EXPERTO
revisado hace 10 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas