Questions tagged [bandwidth-throttling]

Bandwidth throttling is the intentional slowing of the speed at which data is sent from the server to a client. In web programming, it is used to lower the chances of a DDOS attack, by the website/app releasing data in a limited speed.

In web programming, Bandwidth throttling is used to intentionally lower the rate at which data is served to the client. It is considered one of the important methods to lower chances of failure of a site from a DDOS attack.

It can also be used to ensure that all users are accessing enough resources by limiting greedy users who may be using lots of connections and downloading lots of data whereby other users are suffering from slower connections.

Php Example

set_time_limit(0);
$file = array();
$file['name'] = "file.mp4";
$file['size'] = filesize($file['name']);
header("Content-Type: application/octet-stream");
header("Content-Description: file transfer");
header('Content-Disposition: attachment; filename="' . $file['name'] . '"');
header('Content-Length: '. $file['size']);
$open = fopen($file['name'], "rb");
while(!feof($open))
    {
    echo fread($open, 256);
    usleep(500);
    }

fclose($open);

In the above example, a download manager(which opens lots of connections) think that server is unresponsive and hence close all connections

Links

Bandwidth throttling

Work arounds for Bandwidth throttling

135 questions
1
vote
1 answer

How to restrict output bandwidth of each stream in RTMP

I have a digital ocean server for serving RTMP and hls live streaming.Is there any way I can restrict output bandwith for each stream to 1mbps Or 1.5mpbs. I already tried wondershaper but it is limiting the entire server bandwidth but I need some…
Hari
  • 114
  • 1
  • 14
1
vote
3 answers

How to limit download speed in python3 requests?

I am using requests to download a large (~50MiB) file on a small embedded device running Linux. File is to be written to attached MMC. Unfortunately MMC write speed is lower then net speed and I see memory consumption raise and, in a few cases I…
ZioByte
  • 2,690
  • 1
  • 32
  • 68
1
vote
1 answer

Throttle Bandwidth for a copy activity in ADF

I need to limit a download speed of one self hosted IR in Azure to an on premise server to prevent the network to get clogged up. What are my options here? Is it possible to set this is ADF directly or in the IR or do I have to set this in the…
Letimogo
  • 542
  • 3
  • 13
1
vote
2 answers

how to limit bandwidth usage for mongodb master-slave sync

Is there a way to limit bandwidth usage for mongodb master-slave sync. The problem we've got is running out bandwidth when turn on mongodb master-slave sync. Thanks a lot.
teleme.io
  • 815
  • 3
  • 10
  • 21
1
vote
1 answer

IIS7 pseudo streaming FLV with bit rate throttling

I want to combine pseudo streaming of FLV videos with bandwidth control on IIS7.5. Pseudo-streaming is the ability to seek/jump within a video although it has not been completely loaded, yet. It is explained here…
Wintermute
  • 394
  • 4
  • 19
1
vote
0 answers

How can node.js local server be limited to a specific baud rate?

Is there a way to do this? I'm calling node.js server from a bat file: http-server -p 8080 -c-1 exit I read there is throttle, but there is NO info how it can be used in a command line for node.js server -if at all.
user5515
  • 301
  • 2
  • 18
1
vote
0 answers

Unable to accurately throttle the bandwidth using TC rules on docker containers

I am using following TC rules to shape bandwidth and latency between any two containers in a cluster of containers. tc qdisc add dev eth0 handle 1: root htb default 11 tc class add dev eth0 parent 1: classid 1:1 htb rate 150Mbps tc class add dev…
shreyas
  • 11
  • 2
1
vote
1 answer

FB.init() not working when speed is throttled via chrome developer tool

I am using a facebook login feature in my website. But somehow when i throttle the speed using Chrome Developer tool, FB.init doesn't seems to work. My event "fbReady" is not broadcasted. I put a debugger on line FB.getLoginStatus. But the script…
1
vote
1 answer

How do I throttle bandwidth-speed for internal ip-addresses using tc command and cbq-only filter?

I want to limit bandwidth-speed of internal ip-addresses (like 10.8.0.1) and had been trying to use the following rules: tc qdisc add dev tun1 root handle 1: cbq avpkt 1000 bandwidth 3000mbit tc class add dev tun1 parent 1: classid 1:1 cbq rate…
LeVence
  • 41
  • 8
1
vote
2 answers

uploading big size files in java along with throttling bandwidth techniques using java/javascript?

I want to upload large files (can upload files by concurrent users at the same time), will permit sequential file upload per user, want to control upload through throttling techniques (using java). Also, I want to kill the upload process in the…
pjason
  • 155
  • 1
  • 2
  • 10
1
vote
1 answer

Does Tortoise SVN throttle downloads?

I am pulling a massive repository from CloudForge using Tortoise SVN. My download speeds always seem to cap out at 1,500 kBytes/sec. I get this speed on my internet at work, as expected. But with my 150/150 mbps internet at home, I get the same…
Evorlor
  • 7,263
  • 17
  • 70
  • 141
1
vote
0 answers

How to limit just the incoming traffic rate using netem?

How to limit the incoming bandwidth to say 1Mbps using netem? I have searched for tc commands but I could not understand whether the commands that were used limited both incoming and outgoing traffic. In my case I just require my incoming bandwidth…
1
vote
1 answer

Bandwidth throttling in objective c (Limit NSURLConnection data rate)

I want to reduce data rate(Bandwidth throttling) for my mac os x application. I already try place sleep in - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data method but it does not help me. I am also check this…
S. S
  • 169
  • 3
  • 16
1
vote
0 answers

Best advice on clearing buckets using a Token Bucket rate limiting mechanism

I am using the 'Bandwidth Throttle' library to throttle API requests - essentially prevent someone from the same IP making tons of requests within a set timeframe. This creates a bucket (simply a file) that is stored within the buckets…
Zabs
  • 13,852
  • 45
  • 173
  • 297
1
vote
1 answer

Bandwidth Throttling with WebClient

After googling, I found out there's no method to limit download speed in WebClient class. So now I'm thinking of putting Thread.Sleep() in the method of DownloadFileAsync()'s DownloadProgressChangedEventHandler. I guess this way would work anyway…
Jenix
  • 2,996
  • 2
  • 29
  • 58
1 2 3
8 9