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

Would this partially-downloaded image be explained by carrier data connection throttling?

I am re-asking this question under a new, specific hypothesis. If this is the answer I will update/collapse/merge both. Could AT&T throttling the data usage of a subscriber explain an image that looked like this when loaded by our iOS app:…
esilver
  • 27,713
  • 23
  • 122
  • 168
1
vote
1 answer

audio and video streaming - managing CPU and bandwidth

I'm looking into audio and video streaming (at the same time) between a provider and a consumer and I am wondering what are the best/common solutions to handle the balancing between audio and video when it comes to CPU and bandwidth. This is for a…
1
vote
5 answers

Limiting download speed in PHP web frameworks

I'm going to implement a website in PHP using a Web Framework. I never implemented a website in PHP... I don't have problems learning new languages. The problem is that I would like to know if frameworks like Zend, CakePHP can be used to create a…
goodolddays
  • 2,595
  • 4
  • 34
  • 51
0
votes
1 answer

Bandwidth control with LibCurlNet

I am using LibCurlNet to transfer files over the net. I was looking for something like bandwidth throttling using LibCurlNet. Does anyone has any Idea about it? I have found that we can do it using "curlopt_max_recv_speed_large". Didn't find it in…
Deepak Kumar
  • 672
  • 4
  • 15
  • 31
0
votes
1 answer

Code optimization: bandwidth monitor in c# issues

my question is mainly about code optimization(at the moment) I have created a network monitor that monitors different connections on the PC, what i had done is I'm sniffing packets at the 3rd level of the stack(the network level), after capturing…
Adel Ahmed
  • 638
  • 7
  • 24
0
votes
1 answer

PHP giving image with throttled bandwitdth and caching?

Here is a link to an example bandwidth throttling PHP script for a file. I see an improvement I can make that's unrelated that I'll make myself later, but other than that... How could you use this script to make another script that returns an…
user263078
0
votes
1 answer

Bandwidth Source

Please sorry if the following question seems stupid. Otherwise direct me to the appropriate place to ask it. My question is, the webhosting companies where do they lease/get their bandwidth from? Do they rent the bandwidth from telecommunication…
Eddy Freeman
  • 3,207
  • 6
  • 35
  • 55
0
votes
0 answers

How to limit the bandwidth when uploading large files to azure blob storage using go?

I'm using azblob package to upload large video files to azure blob using go. I have multiple video files with large file size for upload. I'm triggering go routines to upload files concurrently to azure blob storage. The issue here is, this program…
0
votes
0 answers

Need to measure pairwire (ip based) bandwidth used over time when using TC

I need to measure the datarates of packets between multiple servers. I need pairwise bandwidths between the servers (if possible even the ports), not the overall datarate per interface on each server. Example output Timestamp Server A to…
0
votes
1 answer

Determining how much of the network bandwith is utilized during/after a jmeter test

I want to understand how to determine whether my internet connection is a bottleneck or not during a jmeter stress test. Here is a bit of background for my problem: I made a stress test with a 2 hours duration, with 2000 threads ramped up over the…
JustNatural
  • 375
  • 7
  • 19
0
votes
0 answers

How to throttle data to a given data rate on a TCP Connection

There are multiple incoming TCP connections and you need to architect a system that will write to an outgoing TCP connection at a particular data rate. How do you programmatically achieve this. The ordering of the packets from different threads is…
user592748
  • 1,194
  • 3
  • 21
  • 45
0
votes
1 answer

Limit Speed in Ubuntu based on traffic

I have come across a script i.e. Wondershaper The script is terrific, however any way to make it smarter? Like it runs after certain traffic has gone through? Say 1TB is set per day, once 1TB is hit, the script turns on automatically? I have thought…
Harsh
  • 152
  • 1
  • 1
  • 9
0
votes
1 answer

Create a bandwidth control system

I plan to use C# to implement the bandwidth control system. I need to implement the system that can allow the system user to set a bandwidth rate to the computer user. How can I do that?
jae33
  • 85
  • 1
  • 2
  • 9
0
votes
1 answer

IntelliJ IDEA debug configuration: bash scripting to limit cpu/bandwidth

I need to limit the CPU and bandwidth of my application for testing purposes during the development process and wrote a small bash script wrapper around the java command, but I'm not sure how I can integrate this approach with IDEA's run/debug…
0
votes
0 answers

Why use exponential backoff algorithm for rate limited system throttling?

I am dealing with a CDN system that has a max request rate per minute (since all objects are about the same size, there is no bitrate limit) Frankly, I do not yet know if it's #/clock minute, or calculated rate. I have a single daemon that downloads…
1 2 3
8 9