Throttling vs Load Shedding
Throttling and Load Shedding are not the same, though they are closely related tools in the "Reliability" toolbox.
Think of Throttling as a Speed Limit (preventative) and Load Shedding as an Ejection Seat (emergency).
Throttling (The Governor)
Throttling is the intentional restriction of the rate of requests. It is usually based on a pre-defined contract or quota.
- Goal: Fairness and resource allocation.
- When it happens: When a specific user or service exceeds their "fair share" (e.g., 100 requests per second).
- Action: The system usually returns an HTTP 429 (Too Many Requests).
- Analogy: A cell phone plan that slows your data down to 3G speeds once you hit 10GB. The network is fine; you just hit your limit.
Load Shedding (The Survival Tactic)
Load Shedding is the intentional dropping of requests because the server is overwhelmed and at risk of crashing.
- Goal: System survival and preventing "death spirals."
- When it happens: When the server’s CPU is at 95%, its memory is full, or its request queue is backed up. The server decides it cannot safely handle more work.
- Action: The system usually returns an HTTP 503 (Service Unavailable).
- Analogy: A crowded nightclub that stops letting anyone in (even VIPs) because the building is at maximum fire-code capacity and the floor might collapse.
Key Differences
| Feature | Throttling | Load Shedding |
|---|---|---|
| Trigger | User-specific quotas / API limits. | System-wide resource exhaustion (CPU/RAM). |
| Focus | Who is sending the request? | Can I handle any more work? |
| Latency | Usually stays low (rejected early). | Often preceded by high latency (the "warning"). |
| Priority | Ignores priority (contract based). | Can be Priority-aware (keep high-value traffic). |
| Outcome | "You've used too much." | "I'm about to break." |
How they work together (The Flow)
In a well-designed distributed system, a request passes through both layers:
- First, Throttling (The Gatekeeper): The Load Balancer checks if User A has exceeded their quota. If yes, it throttles them. This protects the backend from one single "noisy" user.
- Next, Load Shedding (The Safety Valve): Even if no single user is over their quota, if 1,000,000 "legal" users show up at once, the backend will start Load Shedding to stay alive. It will drop the "cheap" or "low priority" requests (like background analytics) to save the "expensive" or "high priority" ones (like checkout/payment).
Recommended Reading
SponsoredVersus
- 32-bit vs 64-bit
- AES vs RSA
- Agent vs Agentless
- Annotations vs Decorators
- Terraform vs Ansible
- BASH vs ZSH
- BigQuery vs Bigtable
- Block Storage vs File Storage vs Object Storage
- Canvas vs SVG
- cgroupfs vs systemd
- Constructor vs Init() vs Factory
- Container Image vs Helm Chart vs OCI Bundle
- Containers vs Virtual Machines (VMs)
- C vs C++
- Java vs C++
- Rust vs C++
- crictl vs ctr
- Dagger vs Guice
- DMA vs RDMA
- DOM vs Virtual DOM vs Shadow DOM
- DQL vs DDL vs DCL vs DML
- eBPF vs Sidecar
- Flux vs Redux
- Full Disk Encryption vs Partition Encryption
- Gatekeeper vs OPA
- Google vs Open Source
- Why MCP uses JSON-RPC 2.0 instead of grpc
- gRPC vs OpenAPI
- gtag.js vs Google Tag Manager (GTM)
- Versus
- Kotlin vs Java
- Jetty vs Netty
- .js vs .jsx vs .ts vs .tsx
- Kata Containers vs KubeVirt
- Linux Namespace vs Kubernetes Namespace
- Linux vs BSD
- LLVM vs JVM
- Data Mining vs Machine Learning vs Artificial Intelligence vs Data Science
- Managed Kubernetes vs Self-managed Kubernetes
- Management Plane vs Control Plane vs Data Plane
- Microcontroller vs Microprocessor vs Computer
- MMU vs IOMMU
- Single-tenant vs Multi-tenant vs Multi-single-tenant
- Multithreading vs Multiprocessing vs Distributed Systems
- Node.js vs Erlang
- OCI Image vs Docker Image
- OCI vs CRI
- OpenSSH vs OpenSSL
- Pass-by-value vs Pass-by-reference
- Podman vs nerdctl
- POSIX vs SUS vs LSB
- Private Key vs Public Key vs Certificate
- Proto Edition 2024 vs Proto Edition 2023
- Proto2 vs Proto3 vs Proto Editions
- Message Queue vs PubSub
- React vs Flutter vs Angular
- REST vs SOAP
- RSA vs ECDSA
- select vs. poll vs. epoll
- SLI vs SLO vs SLA
- Spanner vs Bigtable
- Static Site Generation vs Server-side Rendering vs Client-side Rendering
- Stack based VM vs Register based VM
- Stateless vs Stateful
- Strong Consistency vs Eventual Consistency
- stubs vs mocks vs fakes
- Subroutines vs Coroutines vs Generators
- Software Engineer vs Site Reliability Engineer
- Symlinks vs Hard Links
- JAX vs Tensorflow
- Tensorflow vs PyTorch
- Terminal vs Shell
- Throttling vs Load Shedding
- Unix Domain Sockets vs Network Sockets
- Unix Domain Sockets vs Shared Memory
- URI vs URN vs URL vs URC
- Valkey vs Redis vs Memcached
- Vi vs Vim vs gVim vs Neovim
- WAL vs rollback journal

