Rate limiting in AWS beanstalk

0

Hi, I have a Java beanstalk, and I want to have 1 request per sec rate limiting on all of my end points. I am following https://www.nginx.com/blog/rate-limiting-nginx/ and I created a .platform/nginx/conf.d/proxy.conf with following content

client_max_body_size 10M;

http {
    limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
    server {
        location / {
            limit_req zone=one;
            limit_req_dry_run on;
        }
    }
}

but rate limiting is not working. What is wrong?

  • Will you please elaborate more on how did you configure your java application using Elastic Beanstalk?

  • nothing fancy, used a proc file and i run the jar

posta 2 anni fa1035 visualizzazioni
2 Risposte
1

The root location ("location /") is already defined by the existing file:

/etc/nginx/conf.d/elasticbeanstalk/00_application.conf

To replace the root location you need to replace the entire nginx configuration using the file:

/etc/nginx/nginx.conf
con risposta 2 anni fa
0

Have you considered using AWS WAF for the rate limiting it may meet your needs. You can create rules that rate-limit traffic from specific user-agents, from specific IP addresses, or that contain particular request headers.

RoB
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande