Questions tagged [rate-limiting]

In computer networks, rate limiting is used to control the rate of traffic sent or received on a network interface.

Traffic that is less than or equal to the specified rate is sent, whereas traffic that exceeds the rate is dropped or delayed. Rate limiting is performed by policing (discarding excess packets), queuing (delaying packets in transit) or congestion control (manipulating the protocol’s congestion mechanism). Policing and queuing can be applied to any network protocol. Congestion control can only be applied to protocols with congestion control mechanisms, such as the transmission control protocol (TCP).

240 questions
4
votes
2 answers

Rate limit exim per user basis

How can I implement "rate limit" in Exim so that every user in my exim can send specific number of emails per day. List A of Users can send 100 emails per day and the list B of users can send 500 emails per day.
Waqas Khan
  • 181
  • 1
  • 1
  • 7
4
votes
0 answers

Linux Traffic Controller (Linux tc): hierarchical token bucket (htb) packet queue size

In my Linux router, I am using the following configuration to limit the rate of traffic towards port 44444 of a client in the LAN (client address is 192.168.10.2, connected through the router's eth1 iface): tc qdisc add dev eth1 root handle 1: htb…
bmarcov
  • 41
  • 3
4
votes
1 answer

Logstash, Kibana and email alerts

I am trying to setup email alerts using logstash. Right now it emails me EVERY time the pattern "Error" is parsed into my log file which can lead to a lot of unnecessary emails. I'd like to create a conditional rule so that let's say "X logfile has…
Gabriel
  • 141
  • 1
  • 1
  • 2
4
votes
1 answer

nginx and cloudlfare ip confusion?

I am using the below config in http block of my nginx.conf to get real ip while using Cloudflare acceleration service: ## Cloudflare settings to get Real IP's set_real_ip_from 204.93.240.0/24; set_real_ip_from 204.93.177.0/24; …
iTech
  • 355
  • 4
  • 15
4
votes
2 answers

Limiting bandwidth with hashlimit (e.g. kb/s -- not connections!) doesn't work, though the man page says it should

According to the iptables-extensions man page hashlimit can do bandwidth limiting: "flows exceeding 512kbyte/s" => --hashlimit-mode srcip,dstip,srcport,dstport --hashlimit-above 512kb/s However, when I try to specify a rule like that, 1) it…
4
votes
0 answers

Nginx: Rate limit failed basic auth attempts

Given a simple HTTP Basic Auth setup in Nginx (1.14.1 at time of writing) like this: server { ... location / { auth basic "HTTP Auth Required"; auth basic user file "/path/to/htpasswd"; } } ... how would one apply rate limiting to…
JinnKo
  • 411
  • 3
  • 7
3
votes
1 answer

When nginx reports about limiting requests, what do theese numbers mean?

When you setup nginx with limit_req directive, it logs excessive requests like 2019/10/30 17:41:36 [error] 10775#10775: *195997 limiting requests, excess: 10.210 by zone "zone_name" ... I wonder, what means 10.210 here? I suppose, that 10 is a…
3
votes
2 answers

Rate Limit using Azure Application Gateway

I am changing the deployment of our Web App from Azure App Service to VMs behind an Application Gateway, because the App Service could not handle the peak load we had a few days ago. What I now would like to do to guard the app from a possible…
3
votes
1 answer

BIND DNS rate-limit: qps-scale understanding

I have a few questions concerning qps-scale and how it is used when rate-limit option is used in BIND. Referencing: http://www.zytrax.com/books/dns/ch7/hkpng.html#rate-limit and https://ftp.isc.org/isc/bind9/9.10.8-P1/doc/arm/Bv9ARM.pdf Page…
B. D.
  • 39
  • 4
3
votes
0 answers

Any experience with Nginx Rate limiting in HTTPS scenario?

Does anyone have experience with rate limiting on Nginx HTTPS server listening on port 443? As per my testing, rate limiting seems to work well with Nginx listening on port 80 but I don't get expected results with HTTPS. The details of my…
user440614
3
votes
3 answers

Throttle connections to web service if load gets too high?

I have a web site that communicates via XMLRPC with an XMLRPC server web service. (The web service is written in Python using xmlrpclib.) I believe that xmlrpclib will block while it is handling one request. So if there are three users with an…
3
votes
2 answers

Nginx: Bypass rate limiting with header

This answer is perfect dealing with bypassing rate limiting with IP addresses. If I need to bypass rate limiting with a secret header, how do I achieve this? Ref: http { geo $whitelist { default 0; # CIDR in the list below are…
Quintin Par
  • 4,293
  • 10
  • 46
  • 72
3
votes
0 answers

How to configure per IP bandwidth control using TC?

Requirements: There is an arbitrary number of users per group. Bandwidth for any particular group is 1000kbps. Bandwidth for each user in a group is 70 kbps. At any time no user should not consume bandwidth more than 70kbps. I am using tc & iptables…
3
votes
1 answer

How to do traffic shaping (rate limiting) with TC per OpenVPN client

This question is related to another question with a great answer and script from @Oliver. The goal: I want to modify/extend the script provided in this answer to suit my requirements, which are as follows: I have a large number of clients (up to…
Server Programmer
  • 237
  • 2
  • 4
  • 11
3
votes
2 answers

Nginx - Can I specify rate in limit_req_zone in requests per hour?

While limiting the number of requests from an IP, I am using limit_req_zone $binary_remote_addr zone=one:10m rate=1r/m; I can specify the rate in r/m (requests per minute) or r/s (requests per second). Is there a way to specify the rate in …
1 2
3
15 16