HOME

TheInfoList



OR:

In
computer network A computer network is a set of computers sharing resources located on or provided by network nodes. The computers use common communication protocols over digital interconnections to communicate with each other. These interconnections are ...
s, rate limiting is used to control the rate of requests sent or received by a
network interface controller A network interface controller (NIC, also known as a network interface card, network adapter, LAN adapter or physical network interface, and by similar terms) is a computer hardware component that connects a computer to a computer network. Ear ...
. It can be used to prevent
DoS attacks In computing, a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connec ...
and limit
web scraping Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites. Web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser. While web scraping ...
. Research indicates flooding rates for one zombie machine are in excess of 20
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
GET requests per second,Jinghe Jin, Nazarov Nodir, Chaetae Im, Seung Yeob Nam
"Mitigating HTTP GET Flooding Attacks through Modified NetFPGA Reference Router,"
07 November 2014, pp. 1, Retrieved 19 December 2021.
legitimate rates much less.


Hardware appliances

Hardware appliances can limit the rate of requests on layer 4 or 5 of the
OSI model The Open Systems Interconnection model (OSI model) is a conceptual model that 'provides a common basis for the coordination of SOstandards development for the purpose of systems interconnection'. In the OSI reference model, the communications ...
. Rate limiting can be induced by the network protocol stack of the sender due to a received ECN-marked packet and also by the
network scheduler A network scheduler, also called packet scheduler, queueing discipline (qdisc) or queueing algorithm, is an arbiter on a node in a packet switching communication network. It manages the sequence of network packets in the transmit and receive q ...
of any router along the way. While a hardware appliance can limit the rate for a given range of IP-addresses on layer 4, it risks blocking a network with many users which are masked by
NAT Nat or NAT may refer to: Computing * Network address translation (NAT), in computer networking Organizations * National Actors Theatre, New York City, U.S. * National AIDS trust, a British charity * National Archives of Thailand * National As ...
with a single
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
of an
ISP An Internet service provider (ISP) is an organization that provides services for accessing, using, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, non-profit, or otherwise private ...
.
Deep packet inspection Deep packet inspection (DPI) is a type of data processing that inspects in detail the data being sent over a computer network, and may take actions such as alerting, blocking, re-routing, or logging it accordingly. Deep packet inspection is oft ...
can be used to filter on the session layer but will effectively disarm encryption protocols like TLS and SSL between the appliance and the protocol server (i.e. web server).


Protocol servers

Protocol servers using a request / response model, such as FTP servers or typically
Web server A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
s may use a central in-memory key-value database, like
Redis Redis (; Remote Dictionary Server) is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, su ...
or Aerospike, for session management. A rate limiting algorithm is used to check if the user session (or IP address) has to be limited based on the information in the session cache. In case a client made too many requests within a given time frame,
HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web, ...
servers can respond with status code 429: Too Many Requests. However, in some cases (i.e. web servers) the session management and rate limiting algorithm should be built into the application (used for dynamic content) running on the web server, rather than the web server itself. When a protocol server or a network device notice that the configured request limit is reached, then it will offload new requests and not respond to them. Sometimes they may be added to a
queue __NOTOC__ Queue () may refer to: * Queue area, or queue, a line or area where people wait for goods or services Arts, entertainment, and media *''ACM Queue'', a computer magazine * The Queue (Sorokin novel), ''The Queue'' (Sorokin novel), a 198 ...
to be processed once the input rate reaches an acceptable level, but at peak times the request rate can even exceed the capacities of such queues and requests have to be thrown away.


Data centers

Data centers widely use rate limiting to control the share of resources given to different tenants and applications according to their service level agreement.M. Noormohammadpour, C. S. Raghavendra
"Datacenter Traffic Control: Understanding Techniques and Trade-offs,"
IEEE Communications Surveys & Tutorials, vol. PP, no. 99, pp. 1-1.
A variety of rate limiting techniques are applied in data centers using software and hardware. Virtualized data centers may also apply rate limiting at the hypervisor layer. Two important performance metrics of rate limiters in data centers are resource footprint (memory and CPU usage) which determines scalability, and precision. There usually exists a trade-off, that is, higher precision can be achieved by dedicating more resources to the rate limiters. A considerable body of research with focus on improving performance of rate limiting in data centers.


See also

*
Bandwidth management Bandwidth management is the process of measuring and controlling the communications (traffic, packets) on a network link, to avoid filling the link to capacity or overfilling the link,https://www.internetsociety.org/wp-content/uploads/2017/08/BWro ...
*
Bandwidth throttling Bandwidth throttling consists in the intentional limitation of the communication speed (bytes or kilobytes per second) of the ingoing (received) data and/or in the limitation of the speed of outgoing (sent) data in a network node or in a network ...
*
Project Shield Project Shield is an anti-distributed-denial-of-service (anti-DDoS) service that is offered by Jigsaw, a subsidiary of Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Eng ...
; Algorithms *
Token bucket The token bucket is an algorithm used in packet-switched and telecommunications networks. It can be used to check that data transmissions, in the form of packets, conform to defined limits on bandwidth and burstiness (a measure of the unevenness ...
*
Leaky bucket The leaky bucket is an algorithm based on an analogy of how a bucket with a constant leak will overflow if either the average rate at which water is poured in exceeds the rate at which the bucket leaks or if more water than the capacity of the ...
*
Fixed window counter Fixed may refer to: * ''Fixed'' (EP), EP by Nine Inch Nails * ''Fixed'', an upcoming 2D adult animated film directed by Genndy Tartakovsky * Fixed (typeface), a collection of monospace bitmap fonts that is distributed with the X Window System * ...
*
Sliding window log Sliding may refer to: *Sliding (dance), also floating or gliding, a group of footwork-oriented dance techniques *Slide (baseball), an attempt by a baseball runner to avoid getting tagged out *Sliding (motion) See also *Slide (disambiguation) Sl ...
* Sliding window counter ; Libraries
ASP.NET Web API rate limiter

ASP.NET Core rate limiting middleware

Rate limiting for .NET (PCL Library)

Rate limiting for Node.JS
h1>

References

{{cite web , title=An Alternative Approach to Rate Limiting , url=https://medium.com/figma-design/an-alternative-approach-to-rate-limiting-f8a06cf7c94c , author=Nikrad Mahdi , date={{format date, 2017, 04, 12 , accessdate={{format date, 2017, 04, 16 Network performance