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
2
votes
0 answers

How to simulate a overcrowed wifi with throttling in Charles Proxy

I would like to use Charles Proxy throttling ability to simulate an overcrowed network as the one we can find in an exhibition with a lot of people. I assume there are at least 2 factors that could affect the connection : distance to the…
2
votes
2 answers

How to test streaming bandwidth on localhost with Flash Media Server?

I'm trying to debbug my actionscript (AS3) code on Client side that works with Flash Media Server 4 on localhost. Everything seems fine up to that point. However, when I'm trying to test my player with other remote streaming servers, I notice bugs…
ethiers
  • 55
  • 3
  • 8
2
votes
2 answers

NSURLSession bandwidth limiting

Is there a way to limit the bandwidth in NSURLSession? I'm making file-sync-client for macOS like Dropbox/GoogleDrive/pCloud and they all have bandwidth limiting options, but I'm not sure how to configure NSURLSession to respect bandwidth limiting.
mixtly87
  • 1,675
  • 15
  • 32
2
votes
2 answers

How to limit upload speed for MAMP

I am using MAMP to test my javaScript/flash based website locally. It uses a small php script running on MAMP (Apache 2.0.63) to receive a file uploaded via post from the client. In order to test the upload progress without using huge files I would…
Bjorn
  • 21
  • 2
2
votes
2 answers

How do I Throttle BrowserSync's speed?

How can I configure BrowserSync (from its API) to serve up content at a slower rate? Ideally I'd like to be able to serve only certain files at the throttled rate, so when developing, localhost/index.html loads fast and localhost/dummyData.json…
Eric
  • 1,511
  • 1
  • 15
  • 28
2
votes
1 answer

Throttling Android WiFi Traffic

Does anyone know how this can be done? If so - has anyone seen any examples, tutorials or repositories containing such a method? I've found the following: http://dinote.wordpress.com/opens-asynchronous-android-httprequest/ But I'd like to throttle…
2
votes
1 answer

Limit NSURLConnection data rate? (Bandwidth throttling)

Is there a way to limit the bandwidth used by an NSURLConnection, or I'm forced to use CFNetwork methods?
2
votes
0 answers

Manage network bandwidth on Android

Is there an API to dynamically control how much bandwidth each application is taking in Android? For example if I want to start using a VOIP application and I want to make sure it gets all/most of the bandwidth available ?
user990492
  • 41
  • 3
2
votes
3 answers

Bandwidth limiter for localhost for web development

I have XAMPP running on localhost on Windows 7. I was trying to find a way to simulate the bandwidth of dialup and 3G connections. Is there a current solution which works on a localhost and Windows 7 and is reasonably straight-forward to enable and…
Force Flow
  • 714
  • 2
  • 14
  • 34
2
votes
1 answer

Bandwidth limiting to my app in OS X

I want to write the application (daemon) what synchronizes files and runs in background. And i want to use only a part of bandwidth (better in percents, but fixed limit is acceptable) because full access to bandwidth will interfere user's…
egoroveo
  • 188
  • 1
  • 6
1
vote
1 answer

Is there a "simple" way a Java Application can throttle bandwidth to a specified limit?

I have a Java swing application that can uploads files to a server. It uses all the available upload bandwidth and that's okay when I'm at home. But it uses up a massive amount of upload bandwidth when I'm at work and so I wish to have some setting…
Vigneshwaran
  • 3,265
  • 6
  • 23
  • 36
1
vote
1 answer

Bandwidth throttling in C# windows application

I need to implement Bandwidth Throttling feature in windows application. There are two threads on SO: How to programatically limit bandwidth usage of my c# windows forms application Bandwidth throttling in C# But that is for web app. I need it for…
Deepak Kumar
  • 672
  • 4
  • 15
  • 31
1
vote
0 answers

Java/Javascript/flash upload library with bandwidth limit feature

Is there any such library (like plupload, uploadify...), that has the feature of bandwidth limitation? So when uploading files you can lower the limit to 25% or 50% percent of the full upload bandwidth? I'd like to provide this feature to users of…
Tomas
  • 57,621
  • 49
  • 238
  • 373
1
vote
0 answers

Limit bandwidth of http API requests in golang

I am currently attempting to create a cli app to make use of the box.com api Idea being I could run a command like box cp ~/foo box:/foo and the app would then walk all of the subdirectories of ~/foo and create folders and upload / update files as…
CaffeineAddiction
  • 803
  • 1
  • 14
  • 29
1
vote
1 answer

How can I use Twisted's ThrottlingFactory with their web client?

Problem I need to execute HTTP requests and simulate high latency at the same time. I have encountered the Twisted package in Python which includes both an HTTP client and a ThrottlingFactory. The issue I am encountering is that the documentation is…
Joe
  • 85
  • 12
1 2 3
8 9