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

C# Bandwidth Throttling w/Azure

I wrote a small utility that utilizes Azure blob storage to push some files across for a secondary backup (~100GB). Thus far it works really well, however since it is sitting in a colocation area, my bandwidth usage can hit 190mb/s+ which is a bill…
Scott Salyer
  • 2,165
  • 7
  • 45
  • 82
1
vote
1 answer

socket connection bandwith limiting / traffic shaping with ActionScript

Does anyone know of a way to monitor and/or limit bandwidth usage for a given socket connection in ActionScript 3? I have an Adobe AIR app from which I need to upload large streams of data. However, due to bandwidth restrictions I want my users to…
1
vote
0 answers

Flume Bandwidth Throttling

I am using 8 different services in my application and I bind each and everything with Flume(1.6.0). The biggest headache is my flume instance is drinking up all my bandwidth. I need to restrict the flume sink and source to use limited amount of…
ashokramcse
  • 2,841
  • 2
  • 19
  • 41
1
vote
1 answer

Controlling network bandwidth

Is it possible to write simple module in C to control network bandwidth. For example, in a 10 GB/s network one should be able to increase/decrease bandwidth over 1-2 GB/s in multiples of 50/100 MB/s. The objective is to do this using a slider. The…
Mayank Agarwal
  • 447
  • 1
  • 7
  • 21
1
vote
0 answers

bandwidth throttling in RESTful servers

This is a bit of a theory question, but it was bugging me since some time now. Background Suppose you created a nice RESTful service for some highly volatile data. Your users will need to query the RESTful server quite often to get the changes.…
luksch
  • 11,497
  • 6
  • 38
  • 53
1
vote
0 answers

Squid 3.3.8 delay pool class 1 unexpected behaviour

I am trying to limit the bandwidth of a specific group of users using Squid 3.3. To accomplish this I have used the following delay pools configuration: delay_pools 2 delay_class 1 1 delay_parameters 1 15000/30000 delay_class 2 1 delay_parameters 2…
1
vote
2 answers

Website consuming high bandwidth

My website page size is less than 1mb, including third party links. But in cpanel awstats it is showing bandwidth : 11199.72 KB/Visit. I am unable to understand where my bandwidth goes. I talked to hosting company they are telling there is no ddos…
Mani
  • 125
  • 5
  • 18
1
vote
2 answers

How to monitor and/or throttle rate limit cpu/bandwidth by client-side web pages?

Nowadays it appears that many webpages want to use my cpu/harddrive/bandwidth in order to show me their ads/pages/information in beautiful but expensive ways. Often I like these new pages, but sometimes I'm a curmudgeon and am just annoyed that my…
1
vote
1 answer

How could bandwidth be throttled/limited programmatically in Yosemite?

In OS X 10.10 ipfw (ipfirewall) was removed and replaced with pf firewall. pf uses the ALTQ network scheduler which can be used create bandwidth rules. ALTQ is not supported in the 10.10 kernel so any bandwidth rules are ignored. Several UI tools…
clark
  • 565
  • 2
  • 5
  • 14
1
vote
2 answers

Simulate slow connection between two ubuntu server machines

I want to simulate the following scenario: given that I have 4 ubuntu server machines A,B,C and D. I want to reduce the network bandwidth by 20% between machine A and machine C and 10% between A and B. How to do this using network…
Yahia
  • 1,209
  • 1
  • 15
  • 18
1
vote
1 answer

Methods to limit bandwidth usage with WinHTTP APIs

I'm using WinHTTP APIs in a C++ code similar to the one at the bottom of this article. It runs from my Windows service, and is used to download updates in the background. The code works fine, except that I've received complaints that when it is…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
1 answer

How to perform packet pair probing by sending multiple packets rather than just one pair ? (method for taking average)

Generally in a packet pair estimation, you are supposed to send multiple bursts of packet pairs and take an average of the bandwidths. Say, you send 4 packets, calculate the time difference between the first two packets(1&2), time difference between…
1
vote
1 answer

Limit bandwidth per-IP by value from HTTP Header

I have file download site. What I look for is limiting bandwidth per IP (!). Limit should be set dynamically by HTTP header from backend. My current implementation uses X-Accel-Limit-Rate (I can change that header, it's not hard-coded anywhere), but…
Misiek
  • 103
  • 8
1
vote
0 answers

Setting up a Mac as a wifi hotspot to run mobile broadband test cases

I need to set up an environment where I can simulate mobile network internet connectivity for iOS and Android devices that don't have mobile data plans. I was thinking that I could use my MAC to set up a wifi hotspot and then use ipfw to throttle…
TJ Kirchner
  • 4,321
  • 6
  • 24
  • 26
1
vote
1 answer

Does RestKit support bandwidth limits?

I'm using RestKit to POST large files and it is working well enough that it is using up about as much bandwidth as is available. How do I limit the data rate? I am sending one file at a time so I can't reduce concurrency any further. I know an easy…
1 2 3
8 9