Why the awesome Bonjour Sleep Proxy is... awesome.

Every so often I come across something that I somehow managed to miss the first time around. Rarely, it's something that is so awesome that I then spend the next few hours reading everything I can find online that even remotely links to it.

Today, that thing was Bonjour Sleep Proxy.

Sometimes also simply referred to as Sleep Proxy, I stumbled upon this little gem earlier today, completely by accident. Here's the background...

iStat Server

I've been playing around with Bjango's excellent iStat Server software that allows me to, thanks to the accompanying iOS app, monitor my Windows server and MacBook from anywhere. CPU usage, disk usage, network traffic, processes - you get the idea.

What I noticed when monitoring the MacBook was that even when the Mac was asleep, I could still see up-to-date stats. I assumed that the MacBook was simply being woken up via WOL, so I wandered into the office to have a look. The screen was off. The external monitor was in standby. But the standby indicator on the MacBook itself wasn't flashing. Something was afoot!

iStat for iOS

So, fast-forward to now, and a few hours of Googling later. The answer, apparently, is Bonjour Sleep Proxy.

From what I can glean, and I've been doing this while trying to keep a 15-month old from wrecking our house1 so I'm still a bit sketchy, any Bonjour advertised service can 'Dark Wake' a Mac assuming you have a Sleep Proxy in place. And it turns out I do, even if I didn't know about it.

According to Apple's own resources:

... works by partnering with a Bonjour Sleep Proxy running on your AirPort Base Station, Time Capsule or Apple TV (when no AirPort Base Station or Time Capsule is present on the network). Note: Apple TV will act as a Bonjour Sleep Proxy even if it is in sleep mode.

I told you it was magic.

So, to cut an already long story short, it seems that when I launch the iStat app on my iPhone or iPad the Apple TV knows where my MacBook is on the network, and asks it to allow access to the required Bonjour service - the iStat Server in this instance. The beauty of the whole thing is that the Mac never wakes up. At least, not properly. Oh, and once you're done using the service, OS X puts the Mac back to sleep.

The upshot of all this is that you can have a shared printer, or an iTunes library, or just a shared drive that can be accessible even if your Mac is asleep. It works for SSH too, for those of us that like that kind of thing. If not, screen sharing works as well.

Now if none of that made too much sense, allow me to point you to Stuart Cheshire. The website doesn't seem to have been updated in quite some time, but from his LinkedIn profile it seems he works at Apple. And he knows is....Apples, too.

I can't be the only person that didn't know this existed, can I?

  1. And I managed it too. For the most part. 

Tagged , ,