请输入您要查询的百科知识:

 

词条 Rate limiting
释义

  1. Hardware appliances

  2. Web servers

  3. Datacenters

  4. See also

  5. References

{{about|computer networks|the rate-limiting step in chemical kinetics|Rate-determining step|rate limiting on Wikipedia|meta:Tech/News/2018/30}}

In computer networks, rate limiting is used to control the rate of traffic sent or received by a network interface controller and is used to prevent DoS attacks.[1]

Hardware appliances

Hardware appliances can limit the rate of requests on layer 4 or 5 of the OSI model.

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 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 networks with many users, which are masked by NAT with a single IP-address of an ISP.

Deep packet inspection can be used to filter on the session layer, but will effectively disarm encryption protocols like TLS and SSL between the appliance and the web server.

Web servers

Web servers typically use a central in-memory key-value database, like Redis 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 timeframe, HTTP-Servers can respond with status code 429: Too Many Requests.

However, the session management and rate limiting algorithm usually must be built into the application running on the web server, rather than the web server itself.

Datacenters

Datacenters widely use rate-limiting to control the share of resources given to different tenants and applications according to their service level agreement.[1] A variety of rate-limiting techniques are applied in datacenters using software and hardware. Virtualized datacenters may also apply rate-limiting at the hypervisor layer. Two important performance metrics of rate-limiters in datacenters 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 exists with focus on improving performance of rate-limiting in datacenters.[1]

See also

  • Bandwidth management
  • Bandwidth throttling
  • Project Shield
Algorithms
  • Token bucket[4]
  • Leaky bucket
  • Fixed window counter[4]
  • Sliding window log[4]
  • Sliding window counter[4]
Libraries
  • [https://github.com/stefanprodan/WebApiThrottle ASP.NET Web API rate limiter]
  • [https://github.com/stefanprodan/AspNetCoreRateLimit ASP.NET Core rate limiting middleware]
  • [https://github.com/Husseinhj/RateLimiting.NET Rate-Limiting for .NET (PCL Library)]
  • [https://github.com/tj/node-ratelimiter Rate-Limiting for Node.JS]

References

[2][3]

1 : Network performance

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 21:34:11