2010/12/11

Idea: decentralised P2P website mirroring

The recent case of Wikileaks being booted off AWS provoked the following thought: if lots of people started mirroring wikileaks on EC2, Amazon would be forced into playing whack-a-mole to stop it. Game over: the revolt of a user-base, the inevitable collateral damage, etc. leads to bad PR and (hopefully) reform and vertebrates. Amazon's nice GUI combined with their introductory offer making a micro instance basically free for a year, means that putting up a how-to page/YouTube video showing every college kid with a credit card how to do it can't be too difficult.

My question is, what next? How to you turn a swarm of small, transient mirrors into something findable and load-balanced to deal with the (potentially) huge demand of serving Wikileaks traffic?

Therein lies an interesting problem. First and foremost the question of how you resolve a stable domain to one of a set of highly dynamic addresses is a difficult one. Round-robin DNS load-balancing with a very short TTL is one obvious approach, but this begs the question of how one boot-straps and then maintains the CNAME record containing the list of mirrors. The stable domain could be a CNAME to DNS servers that are themselves part of the mirroring swarm, if each node acted as both a DNS and an HTTP server. Each node would return a randomised list of the nodes in it's topological neighborhood.

Apart from that, I'm not much further along in my thinking. Posadis could be used to implement a simple DNS server - the sample code can practically be copy-pasted by anyone who knows a bit of C++. The P2P network should be easy to do - any DHT should be usable, provided it has an API call to get the list of nodes, since the goal is not really to store information but just to maintain a single cluster of machines that know about each other. But the boot-strapping problem remains.

No comments: