| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 | 
Right now as I understand it, there are n big scaling problems headingour way:1) Clients need to learn all the relay descriptors they could use. That'sa lot of bytes through a potentially small pipe.2) Relays need to hold open TCP connections to most other relays.3) Clients need to learn the whole networkstatus. Even using v3, asthe network grows that will become unwieldy.4) Dir mirrors need to mirror all the relay descriptors; eventually thiswill get big too.Here's my plan.--------------------------------------------------------------------Piece one: download O(1) descriptors rather than O(n) descriptors.We need to change our circuit extend protocol so it fetches a relaydescriptor at every 'extend' operation:  - Client fetches networkstatus, picks guards, connects to one.  - Client picks middle hop out of networkstatus, asks guard for    its descriptor, then extends to it.  - Clients picks exit hop out of networkstatus, asks middle hop    for its descriptor, then extends to it. Done.The client needs to ask for the descriptor even if it already has acopy, because otherwise we leak too much. Also, the descriptor needs tobe padded to some large (but not too large) size to prevent the middlehops from guessing about it.The first step towards this is to instrument the current code to seehow much of a win this would actually be -- I am guessing it is alreadya win even with the current number of descriptors.We also would need to assign the 'Exit' flag more usefully, and makeclients pay attention to it when picking their last hop, since theydon't actually know the exit policies of the relays they're choosing from.We also need to think harder about other implications -- for example,a relay with a tiny exit policy won't get the Exit flag, and thus won'tever get picked as an exit relay. Plus, our "enclave exit" model is outthe window unless we figure out a cool trick.More generally, we'll probably want to compress the descriptors that wesend back; maybe 8k is a good upper bound? I wonder if we could ask forseveral descriptors, and bundle back all of the ones that fit in the 8k?We'd also want to put the load balancing weights into the networkstatus,so clients can choose fast nodes more often without needing to see thedescriptors. This is a good opportunity for the authorities to be ableto put "more accurate" weights in if they learn to detect attacks. Italso means we should consider running automated audits to make sure theauthorities aren't trying to snooker everybody.I'm aiming to get Peter Palfrader to tackle this problem in mid 2008,but I bet he could use some help.--------------------------------------------------------------------Piece two: inter-relay communication uses UDPIf relays send packets to/from other relays via UDP, they don't need anew descriptor for each such link. Thus we'll still need to keep statefor each link, but we won't max out on sockets.Clearly a lot more work needs to be done here. Ian Goldberg has a studentwho has been working on it, and if all goes well we'll be chipping insome funding to continue that. Also, Camilo Viecco has been doing hisPhD thesis on it.--------------------------------------------------------------------Piece three: networkstatus documents get partitionedWhile the authorities should be expected to be able to handle learningabout all the relays, there's no reason the clients or the mirrors needto. Authorities should put a cap on the number of relays listed in asingle networkstatus, and split them when they get too big.We'd need a good way to have each authority come to the same conclusionabout which partition a given relay goes into.Directory mirrors would then mirror all the relay descriptors in theirpartition. This is compatible with 'piece one' above, since clients ina given partition will only ask about descriptors in that partition.More complex versions of this design would involve overlapping partitions,but that would seem to start contradicting other parts of this proposalright quick.Nobody is working on this piece yet. It's hard to say when we'll needit, but it would be nice to have some more thought on it before the weekthat we need it.--------------------------------------------------------------------
 |