Airplay, Skype, Face Time and screen mirroring kept dropping until I did this...

Airplay, Time Machine backups and other connections have failed on our network for seemingly no reason. Updates in bandwidth usage and new applications which hog them meant our network needed to also be optimized to guarantee we wouldn't drop important data. Now it works great!

Over the last few years, I have run into issues with streaming music dropping, issues connecting to conference calls and failures with other "real-time" type data tasks. We have a 50Mbps down, 5Mbps up connection and a N-wireless network, so this shouldn't be the case. The end result:
  • Fixed Airplay dropouts
  • Time Machine backups run smoothly
  • Display mirroring is more stable
  • Skype, Face time and Google Hangouts now work
Even with a high bandwidth, home networks can still run out due to the interaction of local elements.

Our network uses 100x more data than 5 years ago!

What I found out is that we outgrew our previous network and the mentality that it can just be set up and run at necessary speeds.

  • We use above 100GB / month of internet bandwidth (No we don't torrent :-) ) for home and work.
  • Backups move 200GB to 2TB / month across the local network on a daily basis sometimes.
  • 20+ wireless devices may be talking at once on the same channels.

Without a person doing anything, we are running:

  • Dropcam videos (60 GB / m)
  • 6 airplay speakers
  • Time Machine backups for multiple macs (200-400GB per)
  • 15+ devices on wireless
  • 3-5 laptops
  • 3-6 cell phones
  • 2 game consoles
  • Cordless phones
  • Baby monitors
  • Dropbox
In addition to that, it is common to see multiple of these:
  • Skype, Facetime, Google Hangouts
  • VOIP phone call
  • Netflix, Youtube, etc
  • Display mirroring to the projector
The end result is that we have fought with stability, but streaming services have continued to drop packets, so music and video has had a habit of working but then dropping out at all the wrong points. I almost gave up on using Airplay at all because of this.

Why the network failed - multiple things

After a lot of optimizing, I have identified a set of interference which has caused this and ways to improve it. The punchline is that the networks can't guarantee real-time delivery of data given the load an environment, resulting in dropped packets
  • Wireless interference hurt connections - Cordless phones and baby monitors run on 2.4GHz. While they should work in parallel with wireless, I can see packet drops when they turn on and off.
  • Other wifi networks overlapped - Houses nearby added wireless which ended up on either the same frequencies or very close ones which bleed over into our network.
  • Backups swamped wifi - TimeMachine turns on once an hour on each machine and transfers anywhere from 1 MB to 10GB across the network as fast as possible. This seems to disrupt connectivity for other devices and can result in streams dropping. It seems that TimeMachine batches up data transfers, resulting in a period of time each hour where every 30 seconds or so, the network is swamped with it pushing as hard as it can go then it gets more data then repeats. Because multiple computers do this, it can appear every 20 minutes.
  • Wifi drops meant backups failed - each time a backup got corrupted, we had to send 200-400 GB of data over the network again.
  • Single devices could take 100% of bandwidth - even though the wireless hubs are supposed to distribute bandwidth appropriately between devices, it seems that it isn't perfect, and while it does distribute it over time, it seems that a burst on the local network such as a backup, or specific downloads can disrupt other devices.
  • Devices would hop between base stations - to extend our wireless signal, we had multiple wifi points, one at each end of the house. It turns out that devices only hop between them when they lose the signal fully. Therefore, if a person walked from one end of the house to the other, it might still see the first signal barely, but not be able to communicate. It would then fail for a period of time, or have very low speed until it hopped to the next one. Additionally each time it hopped between base stations, applications with a dedicated connection such as a connection to AirPlay, would fail and reset themselves, resulting in the music stopping.

Solutions that fixed stability

Changed wireless frequencies and channels to remove interference

By turning off our wireless and then running a channel scanner to sense the wireless interference on each channel, I found that the 2.4GHz channels were very noisy, even when our wireless phone, baby monitor and all other devices were disconnected. Our neighbor has an outdoor cordless phone, so the best guess is that it is strong enough to bleed across our yard.
  • Changed from 2.4 to 5 Ghz as standard network with a 2.4Ghz backup for older devices.
  • Changed channel to one with the most gap between interference.

Replaced wireless hub with a single longer range one

By using a longer range set of antennas (TP Link C9), we only needed one access point so devices no longer skip between access points, dropping their connections. 

Note: I had to set up the 2.4 GHz network as a fallback because some legacy devices do not support 5GHz and could not see it (Older Apple TV, Wifi connected weight scale, etc).

Enabled Time Machine backups ONLY at night so data bursts disappeared

Using TimeMachineScheduler,  I disabled backups on all computers between 7am and 10pm and changed them to be every 3 hours, rather than every 1 hour. This helped hugely because they used to take up 100% of the local wireless network, resulting in everything else intermittently freezing.

Enabled wifi bandwidth limiting rules so no device could take 100%

On the TP Link hub, I enabled bandwidth guarantees for each device so they would always play nicely together. They now guarantee everyone a few megabits and then evenly split it above that, but never allow a single device to use all of the internet connection.

Removed the baby monitor to improve 2.4 Ghz

Replaced our baby monitor which destroyed the 2.4Ghz channel with a different one which works correctly with Wifi. We still have interference, but now that most devices are running on 5GHz, the few that connect to 2.4 work fine.