PeerCDN uses WebRTC to build a browser-based P2P CDN


Now this is cool: A group of web hackers has built a P2P-based CDN that crowdsources the delivery of data on a website with the help of a bit of Javascript. PeerCDN as the project is called, is based on WebRTC, an emerging technology that’s been built to facilitate real-time communication like voice and video chat in the browser without the need for any plugin. From the PerCDN website:

“PeerCDN automatically serves a site’s static resources (images, videos, and file downloads) over a peer-to-peer network made up of the visitors currently on the site. Offloading part of the web hosting burden to site visitors reduces bandwidth costs.”

The project also made a screencast to explain their approach – check it out:

PeerCND uses WebRTC’s data channel protocol, which was designed to allow developers of real-time communication applications to have their participants exchange data other than audio or video. Think of a file transfer during a teleconference, or a multiplayer game based on WebRTC. And in the case of PeerCDN, it sends files of a website directly from visitor to visitor.

The downside of this approach is that WebRTC is still in its infancy. The data channel protocol has been implemented in Chrome(s goog) as well as nightlies of Firefox, which means that it will be available to the average Firefox user some time in the near future. Both browsers together “account for 58% of global browser usage,” as the PeerCDN site points out.

However, disputes around the way forward for WebRTC have complicated an implementation in Microsoft’s Internet Explorer(s msft), and there is no word yet from Apple (S AAPL) whether it will support the technology in Safari. Still, site owners don’t necessarily need all of their visitors to buy in, especially since PeerCDN can be combined with a traditional CDN.

PeerCDN was built in part by Feross Aboukhadijeh, who is famous for some of his HTML5 exploits. Recently, Aboukhadijeh built a website that automatically filled up its visitors hard discs with gigabytes of cat pictures. Before that, he built a YouTube search site called YTInstant.

Image courtesy of Flickr user  Tsahi Levent-Levi.



this is a great project, but I have some questions:

1. PCDN can download from multiple sources simultaneously?
2. the geographical position of peers are considered for minimize latency?
3. the upload capacity of peer are considered for don’t overload it?
4. this works in nat?
5. if you access a website that uses PCDN your bandwitch can be drained by others users. This can be a obstacle for PCDN acceptance?
6. privacy: you access a porn site that uses PCDN. You look at IPs that are using your cache and surprisingly you observes that another pc from your home are accessing your cache. Or, you access the main sites of the world (you can use Alexa for this) creating a cache. So, you look for your friends IPs (its possible to discover using a chat like skype, facebook chat, msn, etc) and discover what sites these IPs are accessing.

Tsahi Levent-levi

The best thing about PeerCDN isn’t what it does or if it works faster than direct download from a server or from a CDN like Akamai. It is that it is possible to do on the browser level.

WebRTC is changing everything, and innovation around it is happening not because of VoIP developers using it to copy what they did earlier in applications using SIP and H.323, but rather by web developers who are tinkering with the technology:

Jonathan Clarke

Don’t the peer origin downloads tend to be slower than from a web server?


It would actually be faster, in some cases where you have multiple peers whose combined upload rate exceeds that of the server’s. Like the video said, the more peers, the less work on your server.

Comments are closed.