There are millions of people on the internet at any given point in time, meaning systems and networks are working overtime to complete the millions of requests they have to process each day.
In order to keep our network infrastructure from getting overwhelmed by the massive amounts of traffic it processes each day, there are load balancers and rate limiters in place to ensure everything runs smoothly.
However, load balancing and rate limiting are somewhat confused by networking newbies as both of them are often used in a similar context, but they’re actually different. In this article, we’re listing out the differences between load balancers and rate limiting to help solve your confusion.
What is a load balancer?
To put it simply, a load balancer is a piece of hardware (or software) that acts as a reverse proxy server to distribute network and application traffic across multiple servers.
A reverse proxy is a hardware or software component that works on the server end and routes incoming traffic to the corresponding service. It’s different to the proxy most people know, also called forward proxy that works on the client site and routes internet traffic to bypass firewalls.
Hardware load balancers are mostly obsolete now as machines have become powerful enough to handle software load balancing, phasing out dedicated hardware equipment. Not to mention that dedicated hardware costs extra to both produce and run.
What are rate limiters?
Rate limiters also do pretty much exactly what they sound like, however rate limiting is more of a practice rather than an actual tool. It refers to limiting the frequency of an operation from exceeding a predetermined limit.
The system is usually used as a defence mechanism in distributed systems, allowing shared resources to stay available for new incoming requests while not being overwhelmed by the current traffic.
Rate limiting also protects APIs from malicious use by limiting the number of requests that reach the API and need to be processed, otherwise known as a DDoS (Distributed Denial of Service) attack. Without appropriate measures in place, your API and by extension website become highly susceptible to DDoS attacks.
Since rate limiting is a software concept, there are numerous algorithms to implement the practice. The five most popular ones are:
- Leaky Bucket
- Token Bucket
- Fixed Window Counter
- Sliding Log
- Sliding Window
Also read: Should motion blur be on or off?