Your Packets

x

This guide is being written in the open, so you're looking at unfinished draft content. Sorry about the mess.

You can get an idea of the proposed table of contents on this trello board, and if you're up for helping we're looking for help in a number of areas.

If you just want to hear when a first version of the guide is ready, you can sign up for the newsletter too.

More content on the way

In this section, Packets, we’ll look at the environmental impact associated with sending data to our users. We have three main kinds of factors that affect how much CO2 is emitted at this point, ordered by how much control we typically have over them:

Next we’ll run through some of the techniques we have available to us, to control these factors.

How clean is the energy powering the infrastructure?

In short, CO2 emissions occur whenever we generate electricity, and we haven’t used renewable energy to do so.

And right now, about majority of the energy used to power the the servers that run the web comes on fossil fuels. Historically the most common fossil fuel we’ve used has also been coal, which about the worst fuel we could be burning, environmentally speaking.

It’s been chosen before largely because it’s cheap, and within relatively easy access, but it kills more people per kilowatt hour than any other commonly used fuel1, emits more radioactive matter than any other fuel2 (including nuclear), and in most cases, emits the most carbon dioxide per unit of electricity.

In general, burning it for electricity is bad news for our future.

It’s not the only fossil fuel in common use. Depending on which country you live in, there may be natural gas in the mix (especially in the UK), which burns cleaner, and can often be cheaper, but again still ends up emitting CO2 for each unit of electricity generated.

Oil, is somewhere between the other two main fossil fuels, and it’s common for datacentres to maintain stocks of fuel oils, like diesel, in case of power outages on the national grid.

Generally speaking, if we want to generate electricity without emitting CO2 in the process, renewables are the way to go, and this is where the internet can claim a success story: the internet giants like Amazon, Google, and Apple have been a significant driver in renewable purchases globally, in recent years.

In the summer of 2017 Apple’s 1.5 US dollar billion green bond made history as the largest ever bond issued by a corporation, and in 2016, Google became the world’s largest corporate purchaser of renewables, as it continued its run of investment in power for its datacentres.

While this sounds like good news from the tech giants, we don’t just rely on them to get data to our devices.

There’s usually a whole range of other organisations that make up the internet, like the internet service providers who give us broadband connections to our home, and cellular providers whose 4G connections we use to access the internet, to hosting companies, internet exchanges, who often haven’t made the same investments in renewables, and still run largely on whatever a mix of fuels is the norm for the region.

Energy mix around the world

The mix of energy that goes into generating electricity differs wildly depending on where you are in the world - this is sometimes down to geography, and sometimes it’s down to policy decisions made by a region’s government.

You can see this particularly clearly with the electricity map project - an open source interactive map, showing in realtime the energy mix (i.e. the different methods of power generation used) powering the national grids that various countries rely on.

Electricity Map

When we look at this map, it gives us an idea of how clean the emissions are likely to be, on average for a country - for example we can see that in France, with its heavy reliance on nuclear energy, generating a kilowatt hour of electricity than Poland, which is heavily invested in coal.

When we use an infrastructure provider’s network to send data, and they haven’t made public statement about how they are powering their infrastructure, we can assume they are either using a power mix similar to the average for the region.

So, what can we do with this?

Right now, you can use this to get a rough idea of how CO2-intensive moving data around in your country would be, compared to elsewhere. If you were trying to work out the carbon footprint of sending a say, a gigabyte of data, and you had an idea of how much of the impact was happening in each country, you might use this as an input.

This may be interesting, but if you’re not in the business of running network infrastructure for yourself, you don’t have much direct, measurable control over the energy mix of the infrastructure you rely on.

You may have indirect control - like switching ISP or mobile provider in favour of a greener one if this information was available in some meaningful way. Otherwise you might lobby the providers themselves to use renewable power, or your government for this.

Right now, this isn’t really an area we have much leverage, but it’s worth being aware of it. and moving to the next factor.

How much energy did it take to send that data?

The next factor we might look at would be how energy intensive the method used for sending that data might be.

In most cases, this will boil down to the answers of two questions, which we have slightly more control over:

Getting the data from somewhere closer

If we’re in London, and trying to download a cat picture from a website, based in Australia, fetching the data results in a lot of hops along a lot of networks. This means more waiting for the image to arrive, more infrastructure to power, and therefore more CO2 emitted.

If the image is being requested more than once, it’s often better to cache it somewhere geographically closer, and fetch it from there, rather than from the other side of the planet.

This is general idea behind content delivery networks (CDN). Companies like Akamai, who run these, buy server space in thousands of datacentres around the world, and in the case of our cat picture, they store copies of it on their servers, ready for for the next request.

The goal of a CDN is usually performance, but they also offer a degree of redundancy if the original source has gone down, and increasingly, they can serve files in compressed or optimised forms, reducing the bandwidth needed to receive a file.

In addition, another more common way to fetch data from somewhere closer is to actually store the it locally once it’s been requested once.

While most browsers do this by default now, and increasing number of applications are designed to work offline, and with much more sophisticated strategies to avoid making unnecessary requests.

On the web, the browser vendors like Google and Mozilla are making a concerted effort in this direction under the progressive web app, allowing special support in their browsers.

So, where we can access a file, or data in a form that’s closer to us is one thing that affects how expensive (in energy, emissions and [frequently money]3).

What kind of networks do we use to send the data?

The other main factor, is the kind of connection used - whether we’re using what is usually termed a fixed connection to a home or office (wifi, when connected to a broadband connection is still considered fixed, because it’s so short range) or whether we’re using a wide area, cellular connection like a 3G, or 4G, or even 5G data plan from a telecoms company.

It might not surprise you to learn that sending data over a wired connection is more efficient than over a cellular one (we use wires because they conduct electricity, after all…), but there’s more to it than that.

3G, vs 4G

Cellular 3G or 4G connections use differing amounts of energy to move the same data. 4G connections tend to need more energy per connection - you might have suspected this when you saw your phone battery draining faster when using 4G, there’s research to back this up, and this quote Digital Power Group’s The Cloud Begins with Coal report gives an idea of just how much more:

The new high-­‐speed LTE networks that accelerate the mobile Internet require up to three times more data per hour per task compared to the previous slower 3G networks, and thus more energy. And compared to 2G networks, LTE energy consumption is 60 times greater to offer the same coverage.

Why this happens

It’s briefly worth discussing why this happens.

When you have few people using a network, it’s possible to transmit cellular signal at a lower frequency, which for the same power, gives a you relatively long range. The trade off is that you can’t send much data over this quickly, nor have many connections. As ever, it’s more complicated than this, but you can think of 2G and 3G connections making this trade-off compared to what we typically think of as 4G.

When you have more people using a network, to provide the same level of service, one approach is to transmit a signal at a higher frequency. With a higher frequency, more people can use the same network, at a relatively fast rate, but the trade-off is that the range for each transmitter is low, and signals are more easily blocked by large solid objects. So, you end up needing more transmitters to make up for the reduced range. When we talk about 4G being faster than 3G, and supporting more users in the same area, but using more energy, this is the trade-off being made.

The other reason for using more energy. More use!

The other reason is more down to our behaviour - faster connections tend to offer a better user experience, and better user experiences often result in more use.

You can see this in Cisco Systems’ Visual Networking report shows how 4G networks increasingly represent the bulk of mobile data being transferred now:

Although 4G connections represented only 26 percent of mobile connections in 2016, they already accounted for 69 percent of mobile data traffic, while 3G connections represented 33 percent of mobile connections and 24 percent of the traffic. In 2016, a 4G connection generated four times more traffic on average than a 3G connection.

5G and beyond

5G promises faster still connections, and supporting more users in the same area, at the cost of needing many, many more base stations, and using more energy.

To give some context, in the UK, a typical UK mobile provider uses around 17,000 base stations to provide coverage, to provide a mix of 3G and 4G coverage.

For the shift to 5G, Mentor, a telecoms focussed management consultancy is predicting a shift to using 50,000 base stations over 5 year for the same area. This is per operator, and with 4 main operators in the UK, we end up with around 200,000 energy hungry base stations needed to provide coverage alone, where we had around 65,000 before.

Even if these used the same energy per base station as earlier ones did, just having four times as many base stations to serve less than four times as many people, means higher greater energy demand per user.

What this shift to wireless/cellular means

If you make digital products, or websites, what this means is that as a greater proportion of your users use your products over mobile cellular connection, getting data to them becomes more energy intensive.

Unless there’s an explicit commitment to renewables from the infrastructure provides, this means greater CO2 emissions.

So, what can we do with this?

Like the energy mix of the network infrastructure we rely on, we have limited control over what kind of network a user might rely on to use the digital products we make.

If we provide devices as part of a service to users we have some scope for controlling this, but this is comparatively rare.

Mostly, it gives us:

How much data did we send?

When we don’t have direct control over the the infrastructure, and less control over how the products we make are accessed, we are left with one thing we do have control over - the amount of data we send to users.

However, as an industry, not only are users using the products we make more, but we’re also sending more ever more data to each user, when they do the same tasks as before.

The web page obesity crisis

One way to see this is by looking at sizes of the pages we visit in our browsers and our touch devices. We can turn to the HTTP archive, a publicly available dataset of the top 1 million pages for this, and various datasets about their size, content type and so on.

In August 2017 Tammy Everts, the author of Time Is Money - The Business Value of Web Performance , shared some analysis of the pageweight of sites in the HTTP Archive over time.

Speed Curve Page Bloat Stats

This graph shows that the average (i.e. the mean) page weight is growing by around 16% year on year - in 2011, total pageweight was less than a megabyte. By August 2017, it had tripled, to larger than 3mb per page4.

While the majority of this growth has come from ever more images in use, more recently we’re seeing the increased use of video on webpages affecting page weight.

So we’ve established now, that we’re not only moving to a more energy intensive way to shift data, but the pages we visit are getting larger, so we’re moving more data, in a way that emits more CO2.

Beyond HTML and CSS - putting this in context

Before we start feeling terrible about badly our optimised webpages and web-apps destroying the planet, and it’s worth looking at how connectivity is used outside of the web, to get some perspective.

Over the last 5 years, video in particular has become the largest consumer of bandwidth, for cellular and for fixed connections, and it’s foolish to talk about the subject of CO2 emissions of internet use without it.

How we download over fixed connections to our homes

This table below from Sandvine’s 2016 Global Internet Phenomena report, shows peak traffic usage in North America over 2016, downloaded over fixed connections:

Source Share of downstream traffic
Netflix 35%
YouTube 18%
Amazon 4%
HTTP 4%
iTunes 3%
Hulu 3%
SSL 3%
Xbox One Games Download 2%
Facebook 2%
BitTorrent 2%

As you can see, streaming video dominates - Amazon Video, Youtube and Netflix make up more than half of peak traffic in America. Facebook,

What we might consider web traffic, i.e. HTTP and HTTPS together, make up less than 7% now.

How we download over mobile

The same stats for mobile tell a slightly different story - depending on how you count it, web traffic might represents between 15% and 30% of peak download traffic5.

Source Share of downstream traffic
YouTube 21 %
Facebook 14 %
HTTP - OTHER 9 %
SSL - OTHER 7 %
Instagram 7 %
Snapchat 5 %
Netflix 4 %
iTunes 3 %
Google Cloud 3 %
MPEG - OTHER 2 %

However, almost all the other sources are video-heavy - Youtube is a video app, Instagram uses video increasingly in its stories, as does Snapchat, as does Facebook.

We can take a few things away from seeing these stats:

Streaming video is the largest consumer of bandwidth on desktop and mobile

It’s hard to overstate how much a factor video is here in bandwidth usage.

According to Netflix, watching an hour long show in high definition (i.e. 1080p) typically uses around 3 gigabytes of data, and the equivalent to 4k video uses around 7gb per hour. With Amazon Video, they state that their closest equivalent used around 1.4 gigabytes per hour, and just under 7k by comparison.

For perspective, downloading a gigabyte of data emits around as much CO2 as driving a mile in a family car. So watching an hour-long show at 4k emits about as much CO2 as the average daily 7.7 mile commute in America6.

In both cases, 5 publicly traded companies are responsible for more than half of the traffic

Statistically speaking we probably don’t work at these companies ourselves, so don’t have much direct control over them. And in many cases, they’ve already made commitments to run servers in their own datacentres (i.e. their platform) on renewable power.

If we wanted to reduce emissions here, we’re unlikely to have much luck telling our users to stop watching video. We’d likely look to the providers of network infrastructure, and internet service providers, and lobby for them to use cleaner power, or as customers these companies to lobby the ISPs ourselves.

The web as we usually think of it, makes up at least a 15% of traffic on mobile, and around half that figure on desktop

If we’re building a digital product or service and we’re not one of the tech giants above, this is typically where we fit into this picture, and have the most influence over emissions emitted when using it.

While there are measurable environmental savings to be made by rethinking how we build apps to send less data, we shouldn’t kid ourselves into thinking we’re saving the planet by doing so.

Instead, it’s better to think of this like you would with accessibility - it’s the right thing to do, and it also leads to building products that work better - they’ll tend to load faster, and when done right get out of your user’s way to let them meet the needs they have.

Revisit

So there we have it. The three main factors:


Steps you can take

Make the packets green

If there was a campaign or lobbying body for greening our network infrastructure, we could decouple emissions from sending data in the first place.

At present there aren’t any organisations specifically requesting this.

Make them count

We do have control over how much data we end up sending over the wire, and fortunately there is a whole industry’s worth of work we can draw upon here.

Performance budgets

#### CDNs and caching, and offline

Optimising what we send

https://images.guide/

  1. Particulate matter from burning coal causes various respiratory problems, confirmed by many studies. This piece in Scientific American is very accessible 

  2. As coals is burned, various radioactive materials end up concentrated in the fly ash. This often ends up in ponds of landfill sites. 

  3. https://whatdoesmysitecost.com is a site that will show you how much your site costs to access on a range of mobile networks around the world. It’s useful when when speaking to stakeholders about performance and pageweight. 

  4. It’s worth acknowledging that the mean page size shown here is arguably a bit misleading, as a few ginormous pages skew the mean page weight upwards. Video does increase size, but it’s not as bad as this initially graph suggests. Tammy recognises this in the conversation on the post. 

  5. It is not clear in this table if this is the Facebook app, or traffic to Facebook’s online properties. Facebook browser has a browser built in, so traffic assigned to the the Facebook app may be click-throughs to web pages outside of Facebook itself, but the Facebook site and Facebook make extensive use of video as well now. 

  6. This figure comes from taking average commute figures for major US metro areas in this 2015 article from Market Watch, and taking their average. 

Sign up for our newsletter

Hear when new releases of the guide are available, and events where you can get involved.

You'll receive a maximum of one email a month, and you can unsubscribe at any time. Your address will only ever be used for this purpose.