Does AWS ALB support rate limiting?

0

Does AWS ALB support rate limiting? I'm curious about whether ALB offers a feature similar to limiting the number of requests a client can make per second. Alternatively, can this functionality only be achieved through WAF or API Gateway?

질문됨 한 달 전331회 조회
2개 답변
3
수락된 답변

Hi Kerokero,

ALB (Application Load Balancer) does not have a native rate limiting feature as you have asked in your questions.

However, there are a few ways to achieve rate limiting functionality with ALB. Let me share bit more details on that.

  • Use WAF (Web Application Firewall) to configure rate-based rules. WAF allows defining rules to limit the number of requests from an IP address or for a specified time period. The rules can be associated with an ALB to filter and throttle traffic.

  • Use API Gateway in front of the ALB. API Gateway supports configuring usage plans and throttling limits on a per-method or per-resource level. The throttled traffic from API Gateway can then be routed to the ALB.

  • Implement custom rate limiting logic at the application level. For example, count the number of requests at the origin server level using a caching service like Redis. Return 429 (Too Many Requests) response if the request rate exceeds the configured limit.

Hope it helps

AWS
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
  • Hi, Thank you for your help and explanation.

2

Hi There

The best way would be to use WAF (Web Application Firewall) to rate limit requests. WAF allows you to create rate-based rules that limit requests based on attributes like IP address.

https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-rate-based.html

profile pictureAWS
전문가
Matt-B
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
profile pictureAWS
전문가
검토됨 한 달 전
  • Hi Matt Thank you for your response. May I infer that ALB does not offer the functionality of rate limiting, and utilizing WAF for rate limiting would be a preferable option?

  • Correct, there's no native rate limiting that you can control in AWS ALB.

  • Hello Matt Thank you for your assistance.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠