سؤال

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.

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top