0

I'm developing a Windows daemon to sit on an office full of machines and respond to requests with the required information.

It needs to be able to send zipped log files back to the sender. These log files don't get much bigger than ~3MB but it's pretty vital that I limit the bandwidth to around 250KB/s due to the sensitivity of our systems to network spikes.

How can this be achieved in Ruby?

Thanks in advance.

JoshM
  • 110
  • 1
  • 6
  • That's exactly what I want to do! The daemon will send the log files back to a client upon request. I want to restrict the upload from the daemon. Thanks for the reply, but do you have any more info regarding that? – JoshM Feb 26 '14 at 17:40
  • I updated my comment to an answer. See below. – Bjorn Feb 26 '14 at 17:41

1 Answers1

0

Unless I am misunderstanding your goals, you cannot really restrict the rate at which packets come in to your server. But you can limit the uploading speed at the sending computer.

To rate limit at the sending computer: Rate limiting a ruby file stream

Community
  • 1
  • 1
Bjorn
  • 5,272
  • 1
  • 24
  • 35
  • Thanks for that. I can't believe that there isn't more examples of what I'm trying to do and being quite new to Ruby I'm struggling a bit to translate the info in that link into context with what I'm trying to do. I'll give it a few hours and research a bit more and I'll accept your answer if no one can explain this a bit further. Thanks for your help. – JoshM Feb 26 '14 at 17:50