It was just another moment in this long, increasingly strange summer. I was on a train home from Paddington station, and the carriage’s air-conditioning was just about fighting off the heat outside. Most people seemed to be staring at their phones – in many cases, they were trying to stream a World Cup match, as the 4G signal came and went, and Great Western Railway’s onboard wifi proved to be maddeningly erratic. The trebly chatter of headphone leakage was constant. And thousands of miles and a few time zones away in Loudoun County, Virginia, one of the world’s largest concentrations of computing power was playing its part in keeping everything I saw ticking over, as data from around the world passed back and forth from its vast buildings.

Most of us communicate with this small and wealthy corner of the US every day. Thanks to a combination of factors – its proximity to Washington DC, competitive electricity prices, and its low susceptibility to natural disasters – the county is the home of data centres used by about 3,000 tech companies: huge agglomerations of circuitry, cables and cooling systems that sit in corners of the world most of us rarely see, but that are now at the core of how we live. About 70% of the world’s online traffic is reckoned to pass through Loudoun County.

But there is a big problem, centred on a power company called Dominion, which supplies the vast majority of Loudoun County’s electricity. According to a 2017 Greenpeace report, only 1% of Dominion’s total electricity comes from credibly renewable sources: 2% originates in hydroelectric plants, and the rest is split evenly between coal, gas and nuclear power. Dominion is also in the middle of a huge regional controversy about a proposed pipeline that will carry fracked gas to its power plants, which it says is partly driven by data centres’ insatiable appetite for electricity. Clearly, then, the video streams, digital photographs and messaging that pour out of all those servers come with a price.

I was reminded of all this by the recently published book New Dark Age, by the British writer James Bridle. He cites a study in Japan that suggests that by 2030, the power requirements of digital services will outstrip the nation’s entire current generation capacity. He quotes an American report from 2013 – ironically enough, commissioned by coal industry lobbyists – that pointed out that using either a tablet or smartphone to wirelessly watch an hour of video a week used roughly the same amount of electricity (largely consumed at the data-centre end of the process) as two new domestic fridges.

If you worry about climate change and a cause celebre such as the expansion of Heathrow airport, it is worth considering that data centres are set to soon have a bigger carbon footprint than the entire aviation industry. Yet as Bridle points out, even that statistic doesn’t quite do justice to some huge potential problems. He mentions the vast amounts of electricity consumed by the operations of the online currency Bitcoin – which, at the height of the speculative frenzies earlier this year, was set to produce an annual amount of carbon dioxide equivalent to 1m transatlantic flights. And he’s anxious about what will happen next: “In response to vast increases in data storage and computational capacity in the last decade, the amount of energy used by data centres has doubled every four years, and is expected to triple in the next 10 years.”

These changes are partly being driven by the so-called internet of things: the increasing array of everyday devices – from TVs, through domestic security devices, to lighting systems, and countless modes of transport – that constantly emit and receive data. If driverless cars ever arrive in our lives, those same flows will increase hugely. At the same time, the accelerating rollout of the internet and its associated technologies in the developing world will add to the load.

About a decade ago, we were being told to fight climate change by switching off our TVs and stereos. If the battle is now even more urgent, how does it fit with a world in which router lights constantly flicker, and all the devices we own will be in constant, energy-intensive communication with distant mega-computers?

But some good news. Whatever its other ethical contortions, Silicon Valley has an environmental conscience. Facebook has pledged to, sooner or later, power its operations using “100% clean and renewable energy”. Google says it has already achieved that goal. So does Apple. Yet even if you factor in efficiency improvements, beneath many of these claims lies a reality in which the vast and constant demand for power means such companies inevitably use energy generated by fossil fuels, and then atone for it using the often questionable practice of carbon offsetting.

And among the big tech corporations, there is one big focus of worry: Amazon, whose ever-expanding cloud computing wing, Amazon Web Services, offers “the on-demand delivery of computer power, database storage … and other IT resources” and provides most of the computing power behind Netflix. This sits at the heart of data centres’ relentless expansion. Green campaigners bemoan the fact that the details of AWS’s electricity consumption and its carbon footprint remain under wraps; on its corporate website, the story of its use of renewable energy suddenly stops in 2016.

Besides, for all their power, even the most enlightened US giants obviously command only part of a global industry. To quote from that Greenpeace report: “Among emerging Chinese internet giants such as Baidu, Tencent and Alibaba, the silence on energy performance still remains. Neither the public nor customers are able to obtain any information about their electricity use and CO 2 target.” Irrespective of the good work carried out by some tech giants, and whether or not you take seriously projections that the entire communication technology industry could account for up to 14% of carbon emissions by 2040, one stark fact remains: the vast majority of electricity used in the world’s data centres comes from non-renewable sources, and as their numbers rapidly increase, there are no guarantees that this will change.

On the fringes of the industry, a few voices have been heard describing the kind of future at which most of us – expecting everything streamed as a right – would balk. They talk about eventually rationing internet use, insisting that people send black and white images, or forcibly pushing them away from binge-streaming videos. Their basic point, it seems, chimes with those occasions when the smartphone in your pocket starts to suddenly heat up: a metaphor for our warming planet, and the fact that even the most well-intentioned corporations may yet find that their supposedly unlimited digital delights are, in the dictionary definition of the term, unsustainable.

• John Harris is a Guardian columnist