Hi All<br><br><br>I did a small xmlrpc webservice that basicly expose some methods to interact (run commands, for example) with a lists of UNIX servers.<br>At startup, the webservice connects via ssh to all the UNIX servers (currently 16) and leave the connections open waiting for requests from clients.
<br>The app was designed mostly as a way of learninig how to use twisted ssh modules, deferreds etc...<br><br>Some questions (I'll try to be brief):<br><br>1) At startup, the ssh connections to the UNIX servers goes as far as the client connection step (
connection.SSHConnection) and are kept open.<br>So, each time a client requests (via xmlrpc) a shell command to run, the webservice opens a channel to this server (channel.SSHChannel) runs the command, gets the output and closes the channel.
<br><br>Would it be better to leave a channel open so there is no overhead of openning a channel each time there is a command to run? What are the pros and cons?<br><br>2) Supposing that the number of servers grow, how many simultaneous ssh connections is a reasonable amount? 
<br><br>Let's say a Pentium III 500MHz with 1 GB RAM and a 4 Mbits link. What is a reasonable amont? 0-50, 50-100, 100-150?<br><br>I know it depends on the internet link and server specs but is there a math that calculate a reasonable amount of tcp/ssh connections?
<br><br>I guess that's it for now...<br><br><br>Thanks<br>Gustavo<br>