NetTalk Central

Author Topic: Throttling FTP  (Read 5934 times)

Rhys Daniell

  • Newbie
  • *
  • Posts: 34
    • View Profile
Throttling FTP
« on: October 16, 2009, 02:32:36 PM »
I'm thinking of integrating offsite backup into one of our products. Backups would typically be 2-300Mb even when compressed, and I don't want to suck the life out of the customer's internet connection while transfer takes place.

Is there a way to slow the FTP transfer rate so it doesn't take all available bandwidth? Better still, is there a way to detect the bandwidth requirements of other applications so that the FTP transfer rate could be lowered only when required?

Fwiw we already do something similar by using a keyboard hook to detect user activity.

TIA
Rhys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Throttling FTP
« Reply #1 on: October 16, 2009, 04:40:19 PM »
Hi Rhys,

hmm.
detecting the activity on the computer would be hard. Detecting the throughput on a (possibly shared) IP connection would, I think be more than hard. I'm reluctant to say impossible, but I can't see a way of doing that.

Bear in mind that the A in ADSL stands for asyncronous. In other words the _uploading_ of an FTP file will probably not affect the rest of the users who are _downloading_ (mails, web pages and so on). So it's possible that the idea is actually not necessary.

Of course, another option is just to schedule the upload for out-of-office-hours. That's another obvious way not to swamp the network.

That all said, I _think_ it should be possible to throttle the ftp "send". The easiest wa to do that would be to put a "delay" in the DataConnection's SEND method. If you have WinEvent then use something like the ds_sleep command. If not WinEvent, then use YIELD in a loop etc.

Cheers
Bruce