Why throttle bytes
Rate limiting requests is not enough for file storage, because one slow upload of a huge file can monopolize bandwidth even at one request per second. Throttling shapes the byte rate of transfers so the shared network is fairly divided.
Mechanisms
- A token bucket per client fills at the allowed bytes per second; a transfer spends tokens as it moves data and stalls when the bucket empties.
- Per connection caps bound any single stream so no one transfer dominates.
- Fair queuing interleaves chunks from many tenants so a giant file does not block small ones.
Pushing back gracefully
When a client exceeds its budget the server can slow the stream rather than fail it, or return a retry signal. Smooth backpressure beats hard rejection for large transfers, since restarting a multi gigabyte upload is expensive.
Key idea
Throttling shapes per client byte rates with token buckets and fair queuing, and prefers slowing a stream over failing it so large transfers survive.