Wirebook › Bonus lesson
Why does the internet slow down in the evening?
Imagine the internet is water. Your house has its own pipe. All the houses on your street share one bigger pipe under the road, and that joins a giant main that brings water from the rest of the internet far away. A film is like filling a bath: it needs a steady flow for a long time. So what happens at 8 o'clock at night, when everyone on the street turns their taps on at once?
Who decides how much water each tap gets?
Nobody stands at the end of the street with a spanner. The sharing happens by itself, because of how computers send data. Everything travels in small packets, and each app keeps speeding up until the pipe starts to overflow and a few packets get dropped or delayed, then it backs off a bit. With everyone doing that at once, the pipe ends up shared roughly fairly.
Fairly here means something clever. Imagine pouring water into a row of glasses of different sizes, all at the same speed: the small glasses fill up first and stop, and the water left over keeps rising in the big ones. Engineers call it max-min fairness, and "water filling" really is one of its nicknames. That's exactly what the street above does:
- Small sips get everything they need. An online game only needs about 0.2 Mb/s, music about 0.3. Even a very busy street has room for that, so games and music almost never slow down because of the street.
- Films step down a rung. A 4K film would like about 16 Mb/s. If the fair share is only 10, the video player picks the next size down (Full HD at about 8) so it keeps playing instead of stopping. That's the quality ladder.
- Downloads are greedy. A big game download takes as much as it can get, but only from the leftovers, so it never pushes a film off the ladder. When nothing else is running, it gets the whole pipe.
Why is the street pipe smaller than all the house pipes added up?
Because almost never is everyone using all of their pipe at the same moment. Even on a busy evening, most people are watching one film (5 to 16 Mb/s) on a 74 Mb/s plan, and lots of houses are doing nothing much at all. So providers build the shared part of the network smaller than the total of everybody's plans. The gap between the two is the contention ratio: in the street above it's shown as "1 : something". It's the same trick a water company uses. If every house in town ran every tap at once, the water pressure would drop too.
The trouble is the evening. Between about 8 and 10 pm, the "busy hour", far more homes are streaming at once than at any other time. If the shared pipe was built a bit too small, that's when films go soft.
Is a film really like filling a bath?
Pretty much. A film app doesn't sip the film second by second. It fills a little bath of upcoming film, the video buffer, usually a few seconds to a minute ahead, while the picture plays out of the plug hole at the bottom. When the bath is full it pauses the tap, then gulps again. If the water coming in is slower than the water going out, the bath slowly empties. Before it runs dry, the player switches to a smaller size of the film so less water is needed. Only if even the smallest size can't keep up does the bath empty, and you see the spinning circle.
Live video calls can't keep a bath, because the next second hasn't happened yet. That's why a call gets blocky straight away when the pipe is squeezed, while a film often carries on looking fine for a while.
The film tank near your house
Films don't usually come all the way from one giant reservoir on the other side of the world. Big film and video apps keep copies of their most popular shows in tanks inside the internet providers' own buildings, sometimes just a few miles from you. Grown-ups call this a CDN (content delivery network). Tick the film tank in the first box and films stop using the big main from far away, which leaves it free for calls and games.
But look carefully: the tank is past your street. Films from the tank still flow through the pipe under your road, so if the street pipe is the squeeze, a tank doesn't help at all. Finding which pipe is the narrow one, the bottleneck, is the whole game.
Fibre streets share too
With full fibre, one glass fibre leaves the provider's building and is split, like a branching pipe, to up to about 32 homes. That shared fibre is enormous (2,500 or even 10,000 Mb/s), so it rarely fills up, but it's still shared. Older copper broadband shares a cabinet at the end of the street instead. Either way, the bit past your house is almost always shared with your neighbours, and that's normal: it's what keeps broadband affordable.
So what happens when everyone turns their taps on at once?
The water doesn't run out, and nobody's tap stops completely. The shared pipe is split fairly: the tiny sips (games, music, messages) still get everything they need, films step down to a slightly softer picture so they keep playing, and downloads slow to a trickle until the rush is over. When people go to bed, the pressure comes straight back. If it's still slow at 3 am, the narrow pipe isn't the street, it's your own plan, or the Wi-Fi inside your house.
Related lessons: why every speed test gives a different answer · why a video goes blurry, then sharp · why the game lags when someone starts a download · what really kills your Wi-Fi in the bedroom · cable under the sea or satellite in space · why copying to a USB stick is slow.
Grown-up help on Tooltern: the broadband speed calculator (count what your home does at once and see the speed you need), internet slow in the evening: how to test and fix it, what a contention ratio means, how much broadband speed you need, why speed tests give different results, video keeps buffering: causes and fixes, internet lags when someone downloads (bufferbloat), Mbps vs MB/s and why speed tests differ and the streaming data calculator. Glossary: contention ratio, CDN, bandwidth, bottleneck.