简体   繁体   中英

How can I set AWS ELB block too many queries from a given IP?

We have had issues where one IP makes hundreds of requests to our servers, resulting in an overloaded RDS database. Is there a way to set our AWS ELB to block in the case of this DOS-like behavior?

Well, this is a very old post but you can do it with AWS WAF, you just need to attach an ACL to your ELB and set a rate limit rule like in the image: 在此处输入图片说明

I hope this helps someone in the future, I had a really big problem an this solved it for me.

You could block the IP with an ACL rule on the VPC.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_ACLs.html

What you are asking for is rate limit at ELB. Unfortunately AWS does not provide rate limit for ELB.

ELB Rate Limiting and IP Rules

ELB does not support that, as mentioned by helloV. You can do that on the NGINX level: https://www.nginx.com/blog/rate-limiting-nginx/ .

If you have any piece of code as a lambda, API Gateway supports rate limiting (or throttling): https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-request-throttling.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM