In a VOIP application, I have upto 3000 clients rsync
audio files from there linux server in a daily, server is placed at a data center (10Mbps in/out bound), the server works as a VOIP sip server running FreeSWITCH (low ping latency should be ensured.)
Therefore I would like to have server side control of rsync which controls:
- Limit total outbound bandwidth.
- Limit total number of connections. (Reject clients while at max number of connection and let it retry after a specific time frame.)
- OPTIONAL: list/kill individual connections.
Normally I would use ssh + rsync + pem_keys with some extra options, but above requirements are not feasible by simple command lines. Can anyone point me some direction. or show some scripts/tools? I would also probably integrate them and release on github. Thanks!
If I were in your situation, I would continue using stock tools purely because you can always keep them up-to-date and get all the newest bugfixes/features without having to patch them with your own code.
As a result, I would achieve what you wanted with this:
tc
for traffic shaping - OpenVZ has quite a nice article on it.iptables
- Cyberciti to the rescue for this one. You wouldreject
new connections over the threshold, so you would need to wraprsync
client-side to ensure it retries if it fails fast.