Limiting rate on downloading a file http?

K

Kyle Hunter

Hi all,

I'm looking for a solution for downloading a file from http and limiting
the download rate. I do not want to use `wget`. I hear you can atleast
get a ball-park rate-limit out there by using open-uri and sleep. Any
other suggestion, or gems/etc. that can help me?

Thanks.
 
D

Dominik Honnef

Hi all,

I'm looking for a solution for downloading a file from http and limiting
the download rate. I do not want to use `wget`. I hear you can atleast
get a ball-park rate-limit out there by using open-uri and sleep. Any
other suggestion, or gems/etc. that can help me?

Thanks.

Well, if you are using Linux, you can have a look at the program trickle,
an user-space bandwidth shaper/limiter.

But that would be more like.. "trickle $settings ruby file.rb", so not implemented inside your script,
and as said before, linux only. (Dont know about Mac though)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,160
Latest member
CollinStri
Top