BT

Matthew Kaufman on why Skype is Dropping Peer-to-Peer

by Jonathan Allen on Jun 24, 2013 |

In the wake of the NSA revelations in the United States, Skype’s decision to switch from a peer-to-peer network to a server-based network has raised some eyebrows. In a recent email Matthew Kaufman, principal architect of Skype, explained why the change was necessary.

Historically Skype used a peer-to-peer network. When the company was small this reduced startup costs and as it grew the number of users who could act as “supernodes” increased at roughly the same rate. And this was done during the era of always on desktops with broadband connections so the extra load on the supernodes was fairly minimal. Unfortunately most of these machines were Windows boxes running the same version of Skype. So when a bug is triggered, it can bring down massive sections of the Skype network. Matthew continues,

This proved to be a problem when not once, but twice a global Skype network outage was caused by a crashing bug in that client... bootstrapping the network back into existence afterwards was painful and lengthy, and that is in part why Skype has switched to server-based "dedicated supernodes"... nodes that we control, can handle orders of magnitudes more clients per host, are in protected data centers and up all the time, and running code that is less complex that the entire client code base. (And this conversion started well before the Microsoft acquisition was even announced, during the Silverlake era.)

The design also caused problems for clients with limited bandwidth, finite power, or OS-based restrictions.

Over the past few years, the number of Skype users who are using Skype from iOS-based phones and tablets, Android-based phones and tablets, Windows Phone-based phones, and Windows RT tablet devices has gone from a tiny percentage to a significant fraction of our user base. And these devices are a lot different: they're running on battery, sometimes on WiFi but often on expensive (both in money and battery) 2G or 3G data networks, and essentially "off" most of the time. On iOS devices, applications are killed and evicted from memory when they attempt to do too much background processing or use too much memory. On Windows RT and Windows 8 Modern applications, when the application is not in the foreground we only get a few seconds of CPU execution time every 15 minutes and again, strict memory limitations if we want to stay loaded. And when the Skype application is unloaded, it can no longer receive incoming calls or IMs, rendering it a lot less useful.

If you've tried to use Skype on a mobile device, especially if you have a lot of contacts or a lot of IM conversations, you'll discover that it rapidly becomes a battery-powered hand warmer, and drains the battery faster that probably any other well-known application out there. And this is because it, until recently, was participating as a full node on our peer-to-peer network... exchanging packets regularly (over your 3G radio, most likely) with every single one of your contacts to keep presence status updated, exchanging packets with everyone in every IM conversation to keep those conversations synchronized, etc.

The situation for WinRT is arguably worse. WinRT only allocates a few seconds to background applications before sending them back asleep. With the peer-to-peer design both the sender and recipient have to be running at the same time, which is highly unlikely if both happen to be in the background.

How do we solve that for our users? Servers. Lots of them, and more and more often in the Windows Azure cloud infrastructure. In the case of instant messaging, we have merged the Skype and Windows Messenger message delivery backend services, and this now gets you delivery of messages even when the recipient is offline, and other nice features like spam filtering and malicious URL removal. For calling, we have the dedicated supernodes already, and additional services to help calls succeed when the receiving client is asleep and needs a push notification to wake up. And over time you will see more and more services move to the Skype cloud, offloading memory and CPU requirements from the mobile devices everyone wants to enjoy to their fullest and with maximum battery life.

Hello stranger!

You need to Register an InfoQ account or to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2013 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT