The fact that each "Relay" node has to connect to any other node of this type does not mean that the connections need stay open 100% of the time - just while they’re being used. I don’t know the protocol in detail, but second that thread at a given moment only a subset of the possible connections are actually open. There is a configurable limit to the maximum number of sockets open simultaneously, for this reason.
I don’t know how to talk about performance, but network security is impacted by the number of nodes. According to these two questions in security.SE, if an attacker (for example the NSA) creates a large number of Relays, and a connection start and end in a Relay controlled by them (even if it leaves and enters again) it is possible to correlate the package size and the date/time of the connection, and so conclude that the IP address "A" communicated with the "B" - and in many cases (or all), know also the content of this communication.
If the connection only starts at a node controlled by the attacker, you can’t know the content, just profile (i.e. know that IP "A" uses Tor) - which depending on the country and your regime may be all you need to know.
Whether there is a defense to this or not, I cannot say, there is much information and I am not really familiar with this protocol. What I know is that there are different kinds of us: Entry
/Exit
, who communicate with Tor customers; Relay
, that communicate with each other, and may or may not also be Entry/Exit; Bridge
, which is not listed in the Tor directory, so as to make it difficult to identify and Bloquer all nodes; etc. In some circumstances, a client can be configured to restrict which nodes can be used as Entry, but according to the FAQ this should not normally be done, and may even worsen anonymity.
As for the last question, I do not believe there is any communication between the nodes when they are not participating in a circuit at that time (i.e. transmitting a package of point A pro B). So much so that the sockets can be closed - if they are not, it is for reasons of efficiency.
Cross-posted no tor.SE: http://tor.stackexchange.com/questions/1867/is-is-still-true-that-each-onion-relay-keeps-an-open-tls-connection-to-every-oth
– agentofuser